JavaScript with Form Templates

New Here ,
Apr 02, 2018

Copy link to clipboard

Copied

Thanks Try67, your last post help a lot. I have one more question. Keep in mind that this template page can appear on any page. I have a button "P3.CA PG 1 TEMP.addRCCode" that call this function  "addRCCode". The function pulls the value from this field "RCCodeMenu" and puts it in this field "RCCodeText". Is there a way to call these fields using just the last part of the fields name (Example ".RCCodeText")? I am sorry for being a Nuisance. Thanks again Try67.

function addRCCode()
{
var r = this.getField("RCCodeMenu").value;
var s = this.getField("RCCodeText");
var stext = this.getField("RCCodeText").value;

if (stext == ""){
  s.value = (stext + r);
}
if (stext != ""){
  s.value = (stext + " , " +  r);
}

}

TOPICS
Acrobat SDK and JavaScript, Windows

Views

74

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

JavaScript with Form Templates

New Here ,
Apr 02, 2018

Copy link to clipboard

Copied

Thanks Try67, your last post help a lot. I have one more question. Keep in mind that this template page can appear on any page. I have a button "P3.CA PG 1 TEMP.addRCCode" that call this function  "addRCCode". The function pulls the value from this field "RCCodeMenu" and puts it in this field "RCCodeText". Is there a way to call these fields using just the last part of the fields name (Example ".RCCodeText")? I am sorry for being a Nuisance. Thanks again Try67.

function addRCCode()
{
var r = this.getField("RCCodeMenu").value;
var s = this.getField("RCCodeText");
var stext = this.getField("RCCodeText").value;

if (stext == ""){
  s.value = (stext + r);
}
if (stext != ""){
  s.value = (stext + " , " +  r);
}

}

TOPICS
Acrobat SDK and JavaScript, Windows

Views

75

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 02, 2018 0
Adobe Community Professional ,
Apr 02, 2018

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 02, 2018 0