How to check if fields are modified before Submitting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 10:59 AM
I have a catalog item where I am populating 10 fields based on a reference field. Now I want to make sure user has modified atleast one field.
I tried using the below code but it didnt work.
function onSubmit() {
var field1 = g_form.getControl('frist_name');
var field2 = g_form.getControl('department');
if(field1.changed || field2.changed){
return confirm("Values on the form have changed.\nDo you really want to save this record?");
}
I also tried using "g_form.modified" it work but that is not useful in my case as i will be entering a field value on the form.
Is there any way I can do it in onSubmit client script ?
Thanks
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 11:04 AM
Did you try setting the field [Isolate Script] to false on the catalog client script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 11:48 AM
Above should work just ensure you have the Isolate Script set to True on the Client script form.
If you do not find the Isolate script checkbox on form you can add it on form or update it from List View.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2022 07:37 AM
It is set to true but still not working i ma getting error saying that "unable to find the property changed"