Skip to main content
Inspiring
January 20, 2026
Answered

Combining data from two textboxes into one textbox

  • January 20, 2026
  • 1 reply
  • 123 views

I'm using this calculation script:

event.value = this.getField("PREVO").value + " & " + this.getField("COPREVO").value;

 

is there a way to ensure that the & symbol doesn't appear when PREVO is blank? Or if I only have information in PREVO and not COPREVO?

 

875597i577161761926E3B0.png

 

Correct answer PDF Automation Station
var both="";
if(this.getField("PREVO").value && this.getField("COPREVO").value)
{both=" & "}
event.value = this.getField("PREVO").value + both + this.getField("COPREVO").value;

1 reply

PDF Automation Station
Community Expert
Community Expert
January 20, 2026
var both="";
if(this.getField("PREVO").value && this.getField("COPREVO").value)
{both=" & "}
event.value = this.getField("PREVO").value + both + this.getField("COPREVO").value;
Inspiring
January 20, 2026

Thank you!! Is there a way to mess with my formatting on this by chance? I'm curious to know if I leave COPREVO blank, can I change the text size of PREVO?

PDF Automation Station
Community Expert
Community Expert
January 20, 2026

Do you mean text size in the field that contains this calculation?