when name entered in one text field, add both name + current date to another
Can someone correct my script?
I have 4 people that I want to use a form, and when they type their names at the top of the form, it writes the same name and current date in a field at the bottom.
This is what I have, but it's not working:
if (event.value=="John Doe") {
this.getField("Prepared by and date").value = "John Doe util.printd("mm/dd/yyyy", new Date())";
} // end switch;
if (event.value=="Jenny Doe") {
this.getField("Prepared by and date").value = "Jenny Doe util.printd("mm/dd/yyyy", new Date())";
} // end switch;
if (event.value=="Joy Doe") {
this.getField("Prepared by and date").value = "Joy Doe util.printd("mm/dd/yyyy", new Date())";
} // end switch;
if (event.value=="James Doe") {
this.getField("Prepared by and date").value = "James Doe util.printd("mm/dd/yyyy", new Date())";
}
FYI I'm a novice. Thanks in Advance
