Force user to give a specific answer to be able to submit data

376
2
09-17-2020 03:25 AM
Andre_Oliveira
New Contributor III

Hi all,

Im working on a survey to have it on web but im developing it in Connect. I have a selec_one yesno question and I need to force the user to chose 'yes' in order to submit. In order to achieve this, I made a hidden and required field with:

Relevant: ${yesno}='yes'

Calculation: ${yesno}

It works perfectly on Connect app, I cant submit data if I dont answer anything or answer 'no'. But in Web this does not happen. Any ideas where the problem might be? Any workaround?

0 Kudos
2 Replies
IsmaelChivite
Esri Notable Contributor

Hi.I am attaching an XLSFile that I believe does what you want.

A constraint in your yesno question should do the job.

Applying a constraint to a hidden question is not a good idea as there is no good way for the app to highlight the error (since the question is hidden).

Hope it helps.

0 Kudos
Andre_Oliveira
New Contributor III

I guess that works as well. But it's not exactly what I had in mind. Currently what im doing is only give the 'yes' option and it's a required field. But it's also not what I had in mind. 

You bring up a good point but in Connect app, it works perfectly. I have the hidden question but if the user doesnt give the 'yes' answer, the constraint message from the hidden question still pops-up. 

0 Kudos