Select to view content in your preferred language

Email question disappears when changing type from text to email

1039
2
Jump to solution
05-09-2023 05:42 PM
dwold
by
Frequent Contributor

I have a section in a survey where I want the user to enter their email. I have it set up as a text type now. When I change the type to email, the question disappears from the survey. I am assuming I need to do some more configuration for the question to display when using email as the question type?

using text as type:

dwold_0-1683679176695.png

dwold_1-1683679201269.png

using email as type:

dwold_2-1683679293208.pngdwold_3-1683679304684.png

@DougBrowning 

@Katie_Clark 

@Richard_Purkis 

@ZacharySutherby 

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

The email question type in XLSForm is actually not what you thought: The email question is special type of question that captures the email of the ArcGIS account logged into Survey123.  Check this question type in the Survey123 help. The email XLSForm question type is never shown to the end user.  By definition, this question is hidden.

If you want to include a question in your form for respondents to enter an email: I suggest you do the following:

  • Add a text question type
  • Create a constraint with a regex expression to validate that the email entered looks like an email

For example:

regex(., '^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')

 

Attaching an XLSForm so you can see the whole thing.

View solution in original post

2 Replies
IsmaelChivite
Esri Notable Contributor

The email question type in XLSForm is actually not what you thought: The email question is special type of question that captures the email of the ArcGIS account logged into Survey123.  Check this question type in the Survey123 help. The email XLSForm question type is never shown to the end user.  By definition, this question is hidden.

If you want to include a question in your form for respondents to enter an email: I suggest you do the following:

  • Add a text question type
  • Create a constraint with a regex expression to validate that the email entered looks like an email

For example:

regex(., '^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')

 

Attaching an XLSForm so you can see the whole thing.

dwold
by
Frequent Contributor

@IsmaelChivite thank you for the clarification. This helps out greatly!