I have some user input data (name, email, phone nr.), that I´d like to validate using an input field's onBlur behaviour.
In HTML, what I am looking for, would look something like this:
Is there a way to put the functions in StoryJavascript and call them from within <<textbox>> macros?
In HTML, what I am looking for, would look something like this:
<fieldset> <label for="email">Email</label> <input type="text" name="email" id="email" onblur="validateEmail(value)" /> <span id="emailError" style="display: none;">You must enter a valid email address</span> <label for="Name">Name</label> <input type="text" name="name" id="name" onblur="validateName(value)" /> <span id="nameError" style="display: none;">Please enter your full name.</span> <label for="Name">Phone number</label> <input type="text" name="phone" id="phone" onblur="validatePhone(value)" /> <span id="phoneError" style="display: none;">Please provide a valid phone number.</span> </fieldset>
Is there a way to put the functions in StoryJavascript and call them from within <<textbox>> macros?