Regex code/other validation I can use to ensure somebody clicking in a text box will not overwrite? | XM Community
Skip to main content

This could just be some basic regex code, but I am not too experienced with that. To explain further, I am trying to design an embedded data editing feature as I use Qualtrics as an application system. I want to allow for embedded data field/s to be overwritten if the user types something in optional text box questions, but want to avoid people making an overwriting mistake by clicking in a text box, but then deciding not to enter any information. I thought of a branch logic using a MC question with a text box (see below) and the user would have to check the box and also enter text for the embedded data field to be overwritten, but I could see people still making mistakes that way and it isn't really user friendly. Any suggestions?
Screen Shot 2021-08-20 at 2.40.21 PM.png

If I understand your question, you want to NOT accept a blank entry in your text entry (Other) box in case they make a mistake, clicking the box, and then not entering an answer...right?
If right - you can definitely use REGEX to ensure they meet requirements (and may be best)
BUT you can also, in Survey Flow make an embedded data variable (field) equal to the value they enter...AND use a branch (condition) to only do so if the entry is of a certain length/size or "not empty."


mklubeck So if I was to do a branch logic of "not empty" on a text entry box, would a click in the box still register as empty? I will do some tests on this, but thought I would ask in case you know. Also, do you know what regex code I would use if I decided to do that?


Martin_O clicking in the box should still leave it as "empty" status. You have to put something in it for it to not be empty.


Leave a Reply