Skip to main content
stepheng54012748
Known Participant
October 28, 2024
Answered

Javascript Event Values

  • October 28, 2024
  • 1 reply
  • 1264 views

Hello community,

 

I'm hoping someone might be able to help me with a script I'm trying to write.  I have (3) fields of text information (First, M, Last) and when someone fills in each section on the form my goal is to populate those inputs into one field somewhere else on the form.

Field 2a = First

Field 3a = M

Field 4a = Last

 

I know that "event.value=this.getField("2a").value" will give me the value that is in Field 2a.  I just don't know how to put them together into one field and so there is a space in between.  

 

Any help or suggestions would be much appreciated!

 

Thank you in advance.

This topic has been closed for replies.
Correct answer PDF Automation Station

event.value=this.getField("2a").value + " "+ this.getField("3a").value+ " "+ this.getField("4a").value;

1 reply

PDF Automation Station
Community Expert
Community Expert
October 28, 2024

event.value=this.getField("2a").value + " "+ this.getField("3a").value+ " "+ this.getField("4a").value;

stepheng54012748
Known Participant
October 28, 2024

AWESOME!!!  THANK YOU so much.  Exactly what i needed.  

 

Appreciate it.

try67
Community Expert
Community Expert
October 28, 2024

Be aware that using that code if the second field is empty you'll get two spaces in the middle of the combined name...