Data not being saved when input fields use default values

I’m having a strange issue I can’t for the life of me figure out, I hope someone here can help!

My app uses a form that has radio inputs and text inputs. When a user clicks Save, a new “Answer” database type gets created for the answer to each question. If the user has previously saved these fields, the previous answers will be pre-filled or pre-selected as default values.

When a user type/otherwise enters data into these fields and clicks Save, everything is saved to the database as expected.

The Issue:
When the form displays default values, as in the image above, then updates say one field but not the others, ONLY the field that they updated gets saved. There are “Answers” created for each field, but for the questions that the user didn’t touch because they wanted to keep the defaults that were showing, the Answer Thing has a blank.

Any ideas on what could be causing this?

I inspected the fields when pre-filled, and the inspector shows that they do indeed have the correct values, it’s just not getting saved to the database unless the user enters them.

Thanks for any help you can give!

Hi! This is strange…

Are you displaying these values in the “Placeholder” field? Or in the “Initial value” field?

Can you share some prints of your elements and workflow?

@rpetribu thanks for the response!

The values are not in the Placeholder field. For the text input, they are in the Initial content field like so:

And for the radio buttons they are in the Default value field:

These fields load in a repeating group, because the question types are stored in the DB as Questions:

Each Answer is also saved a an Answer thing in the DB, and to do this I’m using the Orchestra plugin to loop through the repeating group and save each as an Answer. Here’s the plugin page:

Here’s the relevant workflow pieces, which run for each Question in the repeating group :


image
image

The Answers are getting created regardless of whether the default values are used, so there’s no issue there. The correct values are being saved when they’re entered for each question, so the workflow is working in that case. It’s only when the default values are showing and the user saves do they not get saved to the Answer.

I also used the inspector to check values when defaults are there, before user has entered anything, and this is what I get as an example:


image

So the value in the inspector is showing the same value as the field is showing, it just doesn’t save it.

Hope this give you some ideas, because I’m fresh out!