To hide error message for a particular field

Aishani
Tera Contributor

Hi All,
I have a CI form where I need to display an error message on a particular field depending on another field which derives data from another table.

 

 

 

I am trying to get a condition here where if the field is empty the error message should be hidden.
But after using the g_form.showFieldMsg('field');
Its still showing up on the CI form.
I might go into detail, but I am afraid it will be more confusing for all readers.

4 REPLIES 4

Brad Bowman
Kilo Patron
Kilo Patron

Try in the Script Include declaring and initializing a variable in the beginning.

var answer = '';

Then in the gr.next block answer = gr.u_billing... Then outside of this block return answer; which will ensure that something is always returned - either an empty value, or the field value from the gr.

Thank you so much, I got an idea on how to fix it. 

Kirby R
Kilo Sage


But after using the g_form.showFieldMsg('u_pmsd_billing');
Its still showing up on the CI form.


Hi @Aishani ,

 

Are you trying to hide after 'asset' field is updated by user? You should add an onchange script also instead of just onload.

Aishani
Tera Contributor

No Not asset field in particular, when asset field doesnt have a particular field value , in that case, I need to display error msg