Skip to main content
Known Participant
January 21, 2021
Question

Text field content checking.

  • January 21, 2021
  • 2 replies
  • 453 views

Within forms I would like to add a script to check the contents of a textfield (TextBox1), to determine if it has been left empty. If it is empty do nothing and wait (or flash to prompt the user). If populated with alphanumeric text length greater than > 5 characters then make visible a dropdown box, dropdown2 for example and stop any user prompt. I presume I would add the script under the 'run custom validation script' of validate option of properties box for which the checking is required, TextBox1 in this example case.

 

Regards

 

 

This topic has been closed for replies.

2 replies

Legend
January 21, 2021

Bear in mind thgat there isn't any "wait" or "next step" in form filling. Users can and do fill fields in any order, rather than any order that suits you. So you have to be prepared for field validations and calculations to happen in any, random, order.

 

Given this the idea of "left empty" isn't really a thing as you can't tell a field that was ignored from a field that is not yet filled. If, however, you have a submit button, this is the time to check for anything the user missed out and report.

try67
Community Expert
Community Expert
January 21, 2021

I would re-think this approach. Imagine the user enters a value that's longer than 5 characters, but then realizes they made a mistake and want to change it. They wouldn't be able to do that if you make that field non-editable...

Known Participant
January 21, 2021

Sorry but I don't understand why they would not be able to edit the text freely. If the text character length was less than 5 chars then Dropdown2 would simply return to a hidden state. I essentially want to ensure the data field is populated before they proceed to the next step. 

 

try67
Community Expert
Community Expert
January 21, 2021

You wrote:

If populated with alphanumeric text length greater than > 5 characters then make visible a dropdown box, dropdown2 for example and stop any user prompt.

 

Which field did you refer to in the last part of that sentence?