Hey everyone
We're currently
programming a questionnaire, in which we use standard oTree forms
definded in the player's class, as well as raw html forms directly
programmed in the html class.
We
discovered, that oTree form fields are automatically validated and
generate an "error message" when the input is not correct and the user
tries to click the "Next" button. (See attachement: "Bitte geben Sie eine Nummer ein" -
white text on purple backround at the field, where the error occured).
This
does not happen with raw html fields. We managed to solve the problem
by doing a custom validity check using javascript so that the user is
alerted, if there's an invalid input in the custom html fields and the
user tries to click the "Next" button. (See attachement: standard javascript alert).
We
would like to match our alert with the alert of the oTree forms, but we
couldn't find the source code for the oTree alerts. Is it possible to
share the code?
Thanks in advance!
Noel