Skip to main content
Inspiring
December 4, 2025
Answered

Script to combine text box and date field

  • December 4, 2025
  • 1 reply
  • 112 views

I have a text box (name) and date field (saledate).

 

My goal is to have Text1 say "E-Signed by JOHN SMITH December 4, 2025"

"E-Signed by (NAME) (SALEDATE)"

 

This is what I have so far, but I'm unsure how to bring the two fields into this.

867817i897B16270160077A.png

 

I hope this makes sense. Thanks in advance!

 

Correct answer Nesa Nurani

Try this as custom calculation script of "Text1" field:

var name = this.getField("name").valueAsString;
var date = this.getField("saledate").valueAsString;

if(name && date){
 event.value = "E-Signed by "+name+" "+date;}
else
 event.value = "";

JavaScript is case-sensitive so make sure field names are correct because "name" and "NAME" is not the same.

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
December 4, 2025

Try this as custom calculation script of "Text1" field:

var name = this.getField("name").valueAsString;
var date = this.getField("saledate").valueAsString;

if(name && date){
 event.value = "E-Signed by "+name+" "+date;}
else
 event.value = "";

JavaScript is case-sensitive so make sure field names are correct because "name" and "NAME" is not the same.