To hide error message for a particular field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:37 PM - edited 02-21-2023 01:14 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 06:54 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 09:12 PM
Thank you so much, I got an idea on how to fix it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 05:05 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 09:11 PM
No Not asset field in particular, when asset field doesnt have a particular field value , in that case, I need to display error msg