Select to view content in your preferred language

Require a field even if it's not visible?

632
2
09-26-2023 11:17 AM
Savannah2019
Occasional Contributor

I have a form with a preliminary question that the user must answer correctly before proceeding (it establishes they are looking at the correct unit). I set it up so that the rest of the questions are required, but conditionally visible. Once they answer the first question correctly, the rest will appear. 

The problem comes if the user attempts to submit it even when they have the question wrong. It still submits even though the actual form's questions haven't been answered yet.

How can I set up my form so that it won't submit if those invisible questions are blank because the first question wasn't answered correctly? I only want the questions to be conditionally visible, not conditionally required.

0 Kudos
2 Replies
JessicaLott_Dymaptic
New Contributor II

Hello,

There may be a better way to do this. Could you auto-populate the unit based on what the user selected with an Arcade expression?

At this time, even fields marked required are not if they are hidden. You could make the field not nullable within your table itself. This would result in an error when they try to submit. 

If you could describe your workflow, I bet there is another option that would make things smoother. 

0 Kudos
Savannah2019
Occasional Contributor

Hello! 

Unfortunately, I don't think either of those would work. Fortunately, I think I have a solution that while not ideal, will work. Essentially in order for the point to disappear off the map and officially be "submitted", I've changed the field the map uses to filter the layer to one that is hidden. So even if they submit, it will still show on the map as an outstanding task.

For the record, why I needed to set it up this way:

New data/tasks are appended every day using a script in arcgis pro- so even if I set the fields as not nullable, when the data is appended, it just populates a " " in any of those fields.

The points are shown on the map(showing units that need replacing) and our field tech is going to go to that location and replace the unit. The information they populate is all the new unit's info. But I've been specifically requested to add a field where they must verify they are looking at the correct unit. So I have it set to only show the additional questions if the serial number they type in matches the existing serial number. If it matches, they can answer the additional questions and submit their work as completed. 

0 Kudos