Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Problems to concatenate two text fields (one field is blank)

$
0
0

Hi everyone,

 

I'm having problems to concatenate two text fields.

 

I found one way to concatenate the two text fields (this.rawValue = line1.value +  " " + line2.value;), but it doesn't work if the 2snf field I am trying to combine is blank.

 

The only way they seems to work is if I setup 2 invisible fields at the top of my form (1 for line1 and another one for line2) and then use the below line of code:

 

if(xfa.record.line2.value != null){

                this.rawValue = xfa.record.line1.value;

} else {

                this.rawValue = xfa.record.line1.value +  " " + xfa.record.line2.value;;

}

 

As I am new to LiveCycle and my knowledge of javascript is quite limited, I was wondering if someone could advise if there is a better way to do it.

What am I missing?

thanks


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>