Select to view content in your preferred language

Can the or_other option be required?

1176
2
Jump to solution
02-10-2022 02:52 PM
GIS_utahDEM
Frequent Contributor

I have a survey with a select_multiple or_other list, but if they select "other" I want it to be required that they enter some text into the or_other box. I could make a secondary or_other question that's relvant from the original, but I'd prefer to keep it tidy (in one line) if I can. 

Thanks!

0 Kudos
2 Solutions

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

I would consider the 3 field option for this.  Having some of your data in the other field becomes a real pain.

Field 1 is the select_one and required

Field 2 is a text box with a relevant of Field1 = Other and required

Field 3 is a calculate type with a if statement to grab Field 1 or Field 2.

Set the bind esri to null for both Field 1 and Field 2 to null so it never even goes to the service.

One downside is domains.  One option for that is to also have Field 3 a select_one and use the esri visable column to hide it from the user.

Just an idea.

View solution in original post

by Anonymous User
Not applicable

Hi @GIS_utahDEM,

It is not possible using the default "or_other" option as part of the same select one question. You can set the select one to be required, but once the "other" option is selected that will satisfy the required requirement, regardless of whether text is entered into the "or_other" text box.

However, as you described, not using the default "or_other" and using an additional text question that is relevant based on an "other" choice in choice list being selected, you can have complete control over the text box and apply the required and any other validation to that text input.

Regards,

Phil.

View solution in original post

2 Replies
DougBrowning
MVP Esteemed Contributor

I would consider the 3 field option for this.  Having some of your data in the other field becomes a real pain.

Field 1 is the select_one and required

Field 2 is a text box with a relevant of Field1 = Other and required

Field 3 is a calculate type with a if statement to grab Field 1 or Field 2.

Set the bind esri to null for both Field 1 and Field 2 to null so it never even goes to the service.

One downside is domains.  One option for that is to also have Field 3 a select_one and use the esri visable column to hide it from the user.

Just an idea.

by Anonymous User
Not applicable

Hi @GIS_utahDEM,

It is not possible using the default "or_other" option as part of the same select one question. You can set the select one to be required, but once the "other" option is selected that will satisfy the required requirement, regardless of whether text is entered into the "or_other" text box.

However, as you described, not using the default "or_other" and using an additional text question that is relevant based on an "other" choice in choice list being selected, you can have complete control over the text box and apply the required and any other validation to that text input.

Regards,

Phil.