As this custom script need for only one button, can move that script to click event itself and can take care the things, if this code block not thru can cancel the rest of the steps.
If need to place on pre-submit it self:
1. Place a new field on form as hidden field, ex: flagField.
2. Assign some specific text/number for "flagField" on click of the Submit button which is required to execute custom code, If click on another submit clear "flagField" value or assign different text/number.
2. Now on pre submit, do compare with "flagField" value and execute custom code script for required button.
Thanks for your quick reply.
The big issue is that buttons of type Submit do NOT have click event. Otherwise, I know how to deal with.
But, since there is no click event and pre-submit event is applied to all buttons of type submit, I don know how to control this specefic button.
Thanks in advance for any ideas!
Please check the sample pdf provided in with the link: https://acrobat.com/?d=VChGiMs8Cs8EKx3lCgkhTA
In this added 2 more button as "Regular" type ones (current you may have "Submit" type ones). "Submit" buttons made as "Invisible" and on click of "Regular" button assign some "flag" and compare that flag on "preSubmit" event. can add custom script on click of "Regular" button before calling the actual "Submit". If you tried already this approach please ignore this.
Thank you soo much Raghu !! You really saved my life. I was blocked there since 1 day.
I owe you a Beer man