These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need Help in Trying to Concatenate 2 Name Fields In Acrobat

PStewart92104
Registered: Dec 2 2011
Posts: 4
Answered

I have a field I'm naming TEXT1 which I want to populate with a concatenate of two values, GLOBAL_USER_FIRST_NAME and GLOBAL_USER_LAST_NAME. I am so new at this and stumbling around. If I name the Field "GLOBAL_USER_FIRST_NAME" it will populate with the User's first name, likewise for the last name. My goal is to have one field that will combine them both so it won't look so jacked up spacing-wise. I've tried using the Calculate/Custom calculation script section in the Text Field Properties and just keep striking out. I'm sure it's probably something simple, but I can't figure it out. Can anyone help me????

Peter

My Product Information:
Acrobat Pro 10.0, Windows
maxwyss
Registered: Jul 25 2006
Posts: 255
Accepted Answer
This should be feasible with this simple one-liner in the Calculation script of your field Text1:

event.value = this.getField("GLOBAL_USER_FIRST_NAME").value + " " + this.getField("GLOBAL_USER_LAST_NAME").value ;


General note: it might also be worthwile for that form to look into the field names; in particular "Text1" or similar is not really developer-friendly…

Hope this can help.

Max Wyss.

PStewart92104
Registered: Dec 2 2011
Posts: 4
Thank you Max!

Peter