Javascript Auto Populate

New Here ,
Aug 03, 2020

Copy link to clipboard

Copied

Hey Experts,

I am seeking some help with Javascript.

 

I have three fields in total.

 

Field A is linked with Field B and C.

If B is blank, field A should populate with Field C total. If C is Blank Field A should populate with B.

I need to submit my assignment tomorrow. Kindly help.

Regards,

Shweta

 

Adobe Community Professional
Correct answer by ls_rbls | Adobe Community Professional

You may use a custom calculation script for field A  with something like this:

 

if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;

else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;

else event.value ="";
TOPICS
PDF forms

Views

41

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 Auto Populate

New Here ,
Aug 03, 2020

Copy link to clipboard

Copied

Hey Experts,

I am seeking some help with Javascript.

 

I have three fields in total.

 

Field A is linked with Field B and C.

If B is blank, field A should populate with Field C total. If C is Blank Field A should populate with B.

I need to submit my assignment tomorrow. Kindly help.

Regards,

Shweta

 

Adobe Community Professional
Correct answer by ls_rbls | Adobe Community Professional

You may use a custom calculation script for field A  with something like this:

 

if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;

else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;

else event.value ="";
TOPICS
PDF forms

Views

42

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
Aug 03, 2020 0
Adobe Community Professional ,
Aug 04, 2020

Copy link to clipboard

Copied

You may use a custom calculation script for field A  with something like this:

 

if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;

else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;

else event.value ="";

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...
Aug 04, 2020 0