Skip to main content
Participant
May 1, 2017
Answered

Auto-populate 2 text boxes after push of button

  • May 1, 2017
  • 1 reply
  • 437 views

I would like to populate 2 text boxes after the push of a button. Basically, after the user clicks Button1, the text 'Hello World' would populate Textbox1 and Textbox2 would be populated with the current date (today's date).

Is this possible with Javascript on the button's action?

Thanks in advance.

This topic has been closed for replies.
Correct answer try67

Sure. The code is:

this.getField("Textbox1").value = "Hello World";

this.getField("Textbox2").value = util.printd("mm/dd/yyyy", new Date());

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 1, 2017

Sure. The code is:

this.getField("Textbox1").value = "Hello World";

this.getField("Textbox2").value = util.printd("mm/dd/yyyy", new Date());