Help with an app like Typeform

Hello,

I am currently developing a form application with similar functionalities as Typeform or Google Forms. Administrators can create forms and add fields of different types. On the form page, each field/question is presented in a RG, and each item contains different input fields shown based on the type of question.

Whenever a user changes an input, a new Answer (data type) is created and attached to the current field, which is then added to a custom state list of completed answers on the form page. If a user changes an input of a current field that already exists in the completed answers (each answer’s field list), then that Answer is updated according to the new input value.

Although this process works well, I am looking for a way to create the Answers data things only when the user clicks a “Save” button. My idea is to store the input values in separate custom state lists such as a list of texts, a list of numbers, and a list of dates. Then, I can use a Backend Workflow to create the Answers on button click.

Here are my questions for clarification:

  • Can the Answers be created using Backend Workflow after the user clicks the “Save” button? If so, how can this be done?
  • If a user changes an input value, what is the best way to select a specific text in a custom state of texts? Do I need a custom state with indexes?

If you have any suggestions on how to achieve this differently, I would be happy to hear them. Please let me know if you need any further clarification.

Best,
Niklas

Options for the ‘Save’ button creating all the answers:

  1. Use the ListShifter or Orchestra plugin to run a Workflow for every ‘Question’ in the repeating group, grab the response, and create an Answer for each item. This might be good for a small number of items but might not be too efficient if there are a lot of questions

  2. Similar logic to the above, but each workflow can Schedule a Backend workflow to create the Answer if you need/want the Answer created on the backend instead of on the page

  3. You can use the ListShifter or Orchestra plugin to build out the Answers in a single JSON structure when the Save button gets pressed, and then send the JSON to a Bulk API endpoint which will create the items on the backend. Some discussion about this from a high level (not exactly how to do it though) can be found here: Create multiple things, FAST

All the above options do not need to interact with a Custom State, so the second question would not be needed. You may only want a Custom State to make sure all required questions have valid input.