button to make an already automatically filled field go blank so that user can type in new info
I have a multi-page form that requires the user's name in numerous blanks. I have named all such fields the same (“Name”) so that when the user fills in the first field all the others are also filled in. However, there is one such blank down in the pack where the user might very occasionally want to leave the field blank or type in different information.
I am new to this, but I have created a button the user can hit and make the one selected field go blank, allowing the user to then either leave it blank or type in new information, without effecting the other fields.
To do this I have cobbled together the following code:
- I changed name of the field to be made changeable from “Name” to “Name1”
- I created a field named “Hidden” that has a display of “Hidden”
- I put the following JavaScript in the calculate tab of “Name1”
if (this.getField
("Hidden").value.length== 0)
event.value = this.getField("Name").valueAsString
4. In the actions tab of the button I put the following two scripts
a)
this.getField
("Hidden").value
=
"Hidden"
b)
this.resetForm("Name1")
Surely to goodness there is a simpler, more straight forward way to do this. What is it? It's bothering me.
Thank you very, very much in advance for your assistance.
