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 uses the same information to fill in numerous blanks, specifically the user’s name. 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 where the user might want to occasionally leave the field blank or type in different information.
I am new to this, but I hae 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.
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 much in advance for your assistance.
