Validar opciones en el choices

Buenas tardes, tengo un menu select_one con varias opciones. Ej: Survey--> select_one estado civil
Choices-->estado civil ( casado, viudo, divorsiado) me gustaría validar la opciones que puse en el choices, para que si es una persona de 15 años no me pregunta si esta casado y solo me aparezcan las otra dos opciones

Gracias por la ayuda

Hello; how are you designing your form? XLSForm? Build? XML? We can give you detailed instructions if we have some more information here.

Either way, you want to look for the information on how to create a cascading select. You want to set up the second select_one with a choice_filter. This old thread has some details. It's a lot of work, though, so maybe it's not worth it.

Sorry for the English response; I can only read Spanish. :slight_smile:

issa is correct that a choice_filter is definitely the way to go if you want to reduce options in a select_one.

One alternative I love is to use constraints or relevance. In the case of constraints, you can put a constraint on the select_one that shows an error when the values don't make sense (e.g., ${age} < 18 and selected(., 'casado')). In the case of relevance, you'd use the same logic, but put it in the relevant column to warn about unusual values.

1 Like