- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 10:30 PM
Hi Team,
How to know whether a field exists on form or not
For ex: I want to know whether field A present on form or not, if present then go ahead and perform validations. if field not exists on form then
don't perform any validations.
Appreciate your inputs
Thanks,
Lohith
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 10:36 PM
you can check using g_form.hasField('<your field name>') if field is present on the form or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 10:41 PM
Please find the Sample code below on incident form.
function onLoad() {
if(g_form.hasField('caller_id'))
{
alert('true');
}
else
{
alert('false');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 11:18 PM