Creating an Error Message in Client Script

aubreysallee
Kilo Contributor

I'm a novice in JS so I'm having some difficulty making a client script to make an error message on the Demand form   to tell the user they need to answer a question in a choice field before continuing if the "portfolio" field contains a value of "AIT." Any suggestions would be very appreciated! At this point I have not found a suitable script to tweak for my purpose, but I do know I probably need to use "getErrorMessage." Thanks!

12 REPLIES 12

Abhinay Erra
Giga Sage

You can use alert() message or g_form.addErrorMessage(message). When do you want this error message to be displayed? When user submits the form?


So the "portfolio" field is going to populated after being submitted, so the error message needs to display after it's submitted and the field is populated. I want to use the addErrorMessage. Do you have a script that would work that you could show me? It needs to be based on the "portfolio" being "AIT" and the Yes/No question not already answered.


So you basically want this check when the form loads and   portfolio" being "AIT" and the Yes/No question not already answered right?


Yes that is correct.