I have built a multi-step form with some clickable elements (groups that include icons and text). I want to update specific Data fields based on the element click that matches an Option Set.
The data field I want to update is part of a Data Type called “Ad”
All data fields that are input fields populate easily.
I have two sections in the form with groups like these where you can click and set up your workflow to sync the Data Field with the Option Set value but I cannot make that step work.
At the end of the form, there is a submit button that triggers the workflow.
The workflow asks me to select one of the options, but I need this step to be automated, and the Option set value should be used based on which element the user clicked.
So you are actually updating the database directly when user changes every input value? it’s a lot of work for your app especially since users can change their minds and switch between options.
It’s common practice to save this type of inputs’ values to custom states (frontend) for every step in a multi-step form and update the database on clicking next or submit if it’s last page. is there a reason you need to update directly?
I don’t need to update directly. The multi step form is a 3-4 steps and I update everything at once when they click submit. Each form submission create a new row in the db.
Ok then, all you need to do is to save the task-type temporarily to an element as custom state on click so that you can reference it on clicking submit. Like this: