PennController for IBEX › Forums › Support › Consent information › Reply To: Consent information
March 9, 2022 at 1:06 pm
#7852
Keymaster
Hi,
Use .test.text to check that the input box is not empty:
//Participant's informations.
newTrial("Variables",
defaultText.css("font-size", "1.2em").print()
,
defaultTextInput.log().print()
,
newText("<p>INFORMATIONS</p>").css("font-weight","bold").center()
,
newText("How old are you? :").css("margin-top","25px")
,
newTextInput("age", "")
,
newText("Where do you live?.").css("margin-top","25px")
,
newTextInput("city", "")
,
newButton("Click", "Continue")
.center()
.css("margin-top","50px")
.print()
.wait( getTextInput("age").test.text(/\d/).and(getTextInput("city").test.text(/\w/)) )
)
Jeremy