0

I handle a formSubmission event on Circuit using Circuit JS SDK. Then I update an item that contains this form by using method updateTextItem. I want to save previous value of item.content. But received event contains only itemId. Is it possible to get item by itemId to get content?

client.updateTextItem({
      itemId: event.itemId,
      form: {
          id: event.form.id,
          // content: ???,
          controls: [{
                type: 'LABEL',
                text: submittedValue
          }]
      }
});

1 Answers1

0

Use API getItemById or getItemByIds. https://circuitsandbox.net/sdk/classes/Client.html#method_getItemById

Roger Urscheler
  • 774
  • 2
  • 6
  • 11