I’m creating a functionality where users can create dynamic questions with dynamic answers similar to Google Forms. Users have the option to choose between Checkboxes, Multiple choice, and a Short Answer.
What I’m having trouble with now is saving these answers with only one button click at the end.
In the previous thread, @gf_wolfer suggested the “When an Input’s Value is Changed” workflow but I’m still a little confused because I’m using a repeating group for the dynamic answers instead of actual input elements because of the possibility of a question with multiple answers.
The RG of options will show conditionally depending on the type of question — RG Checkboxes for a checkbox question, where you can select multiple answers using a custom state; RG Multiple Choice for options with only one possible answer; and the MultiLine input for Short Answer Questions.
Was considering an API Workflow to go through each question but that doesn’t seem to work either. Any suggestions? Would appreciate any help. Thank you!
I’m trying to save the form’s answers. No problem creating and displaying both questions and answers. It’s when they have to fill out the form with answers that I’m having trouble saving these answers.
I’d like it to be one button at the end so they don’t have to keep clicking ‘Next’ after answering every question
That does get a bit tricky with dynamic questions and answers. You may want to store the answer upona user selecting the answer. Although that does complicate it a bit by having to track any changes the user makes.
You’ll notice I save the questions they answered as text, and not as references to the question data type directly. This was intentionally about what if the template changes, how do I still show legacy answers. This was my solution.
I have 2 workflows per input. For the checkboxes, I have a few.
I then save that answer to the repeating group cell by using a group and a custom state inside the cell. I conditionalize the workflows to whether or not this is empty, and if it isn’t, I just modify the answer as opposed to creating a new one.
Essentially, I first set a state of the button that just says it is in the process of submitting, to avoid duplicates. Then, I clear the answers with a custom event and then create a new Application Submission. This was an application system, so I changed the status of a field under the user and then forced a scroll for better UX. The backend workflow is a Discord notification I had setup for when an application was completed, and then an email to say the application was submitted.
Just another solution to a complex problem. The way I set this up may be less efficient, I don’t know, but I know it worked well for my case. The app is no longer live, so I’m not sure how the WU consumption is.
I was wondering if you had a functionality for users to edit their applications later on. This would mean having to display their answers back into the repeating group of dynamic choices. Any advice on how to go about that?