Copy link to clipboard
Copied
Hello.
Is there a way (javascript) to get the name of a field or a button when you click on it and display it with app.alert?
Thanks in advance for your advice.
Try:
event.target.name
Copy link to clipboard
Copied
Try:
event.target.name
Copy link to clipboard
Copied
There is a "name" property for a field object.
One can use a script like:
"app.alert("Field name: " + event.target.name, 3, 0);
In the one of the action options for the field in the "Create form" tool, but then you would see name on the "General Tab".
You can use the "getNthFieldName" method to list all the names on the form in the JavaScript Console.
Copy link to clipboard
Copied
Thank you very much both for your helpfull answers,.
Regards.