Skip to main content
Known Participant
December 7, 2020
Answered

Requiring text in text entry box

  • December 7, 2020
  • 1 reply
  • 2046 views

I've spent half of my afternoon scouring the internet to figure out how to do this, with no luck so far...

I need to have a text entry box where the user is required to enter text before they can click the "submit" button.  Initially I tried to do this with a short answer question slide, where I could simply employ the "incomplete" caption, but the text entry needs to be multiple-line, and scrolling if necessary.  Short answer slides are not the answer.

For a default text entry box, the "submit" button is clickable even if the box is empty. How do I (and is it even possilbe) set up a TEB requirement for something (anything) to be entered before the "submit" button is accessible?

Thank you!! 

    This topic has been closed for replies.
    Correct answer Lilybiri

    Have a look at this blog post, the HTML edition of a 10 years old, very well visited article. How did you miss it?

    http://blog.lilybiri.com/where-is-null-in-cp2017

     

     

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Braniac
    December 8, 2020

    Have a look at this blog post, the HTML edition of a 10 years old, very well visited article. How did you miss it?

    http://blog.lilybiri.com/where-is-null-in-cp2017

     

     

    re_volverAuthor
    Known Participant
    December 8, 2020

    Thank you Lilybiri,

    I'm trying, but I'm unable to make this work...  My need is very simple.  I only need one slide to recognize whether text has been entered, and if not, show a caption informing the user they must enter something, then allow them to retry. 

    I guess I'm still not understanding variables very well.  I've tried to apply your workflow, but I must be missing something.

     

    Lilybiri
    Braniac
    December 8, 2020

    Show what you did, step by step.:

    • Associated variable to Text Entry Box?
    • User variable v_null created?
    • Warning message created and hidden in output?
    • ...