Automatic copy of more fileds value in one field

10 views
Skip to first unread message

Alex

unread,
Jul 22, 2011, 9:27:37 AM7/22/11
to cenos...@googlegroups.com
Dear Yang,

I have three text fields:

surname
name
surname and name (read only)

I want that when I insert values in surname field and name field automatically they compare in surname and name field (surname.value + name.value).

Tank you another time,
Alex

Yang Lu

unread,
Jul 22, 2011, 11:56:18 AM7/22/11
to cenos...@googlegroups.com

Alex,

 

If the surname and name box is read-only, do you mean they have already had initial values to do the comparison?

 

Thanks,

Yang

--
You received this message because you are subscribed to the Google Groups "CenoPDF Support Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cenosupport/-/woFC3kGgTfMJ.
To post to this group, send email to cenos...@googlegroups.com.
To unsubscribe from this group, send email to cenosupport...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cenosupport?hl=en.

Alex

unread,
Jul 22, 2011, 2:09:59 PM7/22/11
to CenoPDF Support Group
I want this behaviour:

text field nr. 3 (surname and name) must be ever the the "sum" of
others (surname.value + name value).
When I insert text in fields 1 (Surname) and 2 (Name) the field 3
(Surname and name) must automatically show me the sum of their values.

Thanks,
Alex

On 22 Lug, 17:56, "Yang Lu" <y...@lystech.com> wrote:
> Alex,
>
> If the surname and name box is read-only, do you mean they have already had
> initial values to do the comparison?
>
> Thanks,
>
> Yang
>
> From: cenos...@googlegroups.com [mailto:cenos...@googlegroups.com] On
> Behalf Of Alex
> Sent: Friday, July 22, 2011 6:28 AM
> To: cenos...@googlegroups.com
> Subject: Automatic copy of more fileds value in one field
>
> Dear Yang,
>
> I have three text fields:
>
> surname
>
> name
>
> surname and name (read only)
>
> I want that when I insert values in surname field and name field
> automatically they compare in surname and name field (surname.value +
> name.value).
>
> Tank you another time,
>
> Alex
>
> --
> You received this message because you are subscribed to the Google Groups
> "CenoPDF Support Group" group.
> To view this discussion on the web visithttps://groups.google.com/d/msg/cenosupport/-/woFC3kGgTfMJ.

Yang Lu

unread,
Jul 22, 2011, 3:04:55 PM7/22/11
to cenos...@googlegroups.com
I see. Add the following code in the On Blur of field 1 and 2:
 
var f1 = this.getField('surname');
var f2 = this.getField('name');
var f3 = this.getField('fullname');
 
f3.value = f1.valueAsString + f2.valueAsString;

 
Thanks,
Yang
Reply all
Reply to author
Forward
0 new messages