Hi, everyone! I created my first survey in Survey123Connect.
I have a few questions that ask for open-ended answers, but I really need to limit these to very minimal characters. For example, two questions ask for an answer or 3 or less words. However, it keeps reading as the default 255 character limit when the survey is published.
On the other hand, I have this same character-limit set up on other questions and it works just fine.
All questions relative to this need are text "text" type. What could be the problem?
Is the field length set to 3 in the feature class being edited by the survey? That's what comes to my mind.
Hey @mathena1
I was curious if you could link the XLS forum that you're using in the post? I'd be glad to check it out and see if anything pops out!
Cody
Hey @mathena1
I'm continuing to look into this, but I have found this in my own Survey working before, under the constraints section, give this regex a shot:
regex(., '^(\S+\s?){0,2}\S+$')
This checks for 0-2 occurrences of the matching string, so three total, and it has worked for me in the past with 5-10 word requirements.
Hope that helps!
Cody
Thank you! That didn't seem to help, but I could have input that in wrong. Do I insert that in - as is - into the constraint column for each question I need limited? Do I change anything in the regex? Thanks for trying to help!
Hey @mathena1
I may have misunderstood your question I apologize, the 255 limit will stay on the field itself, but the regex will prevent more than three words from being entered, if there are more, it will reject the entry like this:
I entered it here on the constraint column, but it would be for each question you would like to be limited word-wise.
Now that I hopefully understand the question, sorry about that, this is how you would set the character restriction:
This is what you would see in the forum:
Edit:
I've seemingly blanked that you stated it was not working after publishing, I've published the one I ended up attempting the change of fieldLength and it shown without issue, which is real odd. Does it show different within the editor?
Hope that helps a little more!
Cody