Hello,
I’m new to the coding world and so I have a big lack of knowledge in using wix corvid.
Here’s my problem : I would like to set the validation state of a text input to a specific word (“baguette” for example), so when the user type this word in the dedicated area, he gets a confirmation message, and then it expands a box on the page.
I know this looks very stupid, but i’m stuck and would be very grateful to whoever helps me !
Thank you in advance.
Use if-else-combination.
if (i was young again === true) {i would change some parts of my life}
if ( ) { }
if ($w('#myInputField').value === "TEXT") {
$w('#myBOX').expand()
$w('#myBOX').show()
$w('#myTextBox').text = "Congratulation"
//do here some more actions, which ever you want.....
}
else {
$w('#myTextBox').text = "Sorry"
//do here some more actions, which ever you want.....
}
Your used elements would be…
- 1x Inputfield
- 1x Box
- 1x Textbox
Hey ! Thank you very much for your answer.
But i can’t get the “congratulation” text to appear when i write the word in the inputfield. It’s like it does not update…