Saving Input Data from a Repeating Group With One Button Click

Hey you Bubble Gurus…

I have a repeating group containing a list of things of type Question. Each cell has text “Question Text”, and an input “Answer Input” in which the user types their answer.

The result to each Question is to be saved in a thing of type Answer (which has fields Question Text, Answer Text, User).

Rather than a submit button per question, I want one submit button at the end.

Seems a pretty common use case, so I was hoping the solution would be simple to implement… but maybe I’m missing something.

I’m guessing I need to schedule an API call on a list. I assume that list is my list of Questions, and the API creates a list of Answers.

But I don’t know how to pass in my list of “Answer Inputs”. Is there a relative easy way to do that?

Best wishes,
Antony.

1 Like

I think there are plugins now that make this easier but in the past two methods have been discussed. One involves usind a custom state while the other involves saving records in a draft state as they are entered and then changing their status from draft when the save button is clicked. This post has more.

Hey Antony!

My understanding is similar to that of Louis – two main flavors: create empty records with a field to flag them as draft (and if this is never toggled should be considered to have not been saved) and then use auto-bind or update on change and a save button to toggle the draft status.

The other is the complicated custom state approach – I’ve shown one possible approach to that here.

Hey @louisadekoya and @mebeingken

Thanks for your input, I really appreciate it! I’m going to go down the custom state route… it seems to save a lot of database access time, and this questionnaire will get a huge amount of use… and database time is ultimately money!

Best wishes,
Antony.

This topic was automatically closed after 70 days. New replies are no longer allowed.