Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) Forms & FDF


Topic: Re: Combining two fields (Via Email)
Conf: (P-PDF) Forms & FDF, Msg: 27824
From: prodok
Date: 10/1/2001 07:15 AM

Have another look at your script.

You define the variable "full" as the result of a concatenation. This
means, it is a string value.

Then you set the event.value to full.value. But as you have defined
the variable full as a value, it does not have a value property. It
IS the value.

So, you change the last line of your code to

event.value = full ;

and this should do it.

Another approach would be defining full as a field variable do the calculation

var full = this.getField("full") ;
full.value = fname.value + " " + lname.value ;

And that should do it as well.

Hope, this can help.


Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland

Fax: +41 1 700 20 37
e-mail: mailto:max@prodok.com
http://www.prodok.com



[ Building Bridges for Information ]


______________________




Shameless Plug:
I will have presentations and pre- and post-conference workshops at
the .PDF2001 West Conference in Scottsdale, AZ, Nov. 5 to 7, 2001.
More details at http://www.pdfconference.com.

Workshops:
Nov. 4: Implementing Business Processes based on PDF
Nov. 8: Enhancing PDF Forms


_________________________




>Thanks that is a good idea. I tried putting the folloing script into the
>"calculate" area of the full name field
>var fname = this.getField("First");
>
>var lname = this.getField("Last");
>
>var full = fname.value + " " + lname.value;
>
>event.value = full.value;
>
>However, this made the "full" field say "undefined". It just had the word
>"undefined" where the full name should have appeard. I tested this out
>doing acutally calculations and it works great! But with Strings it won't
>combine the fields.
>
>Is there something I could change in my script? Is there some other way I
>could go about this?
>

PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: 2009 IRS income tax forms available for download

With less than a month to go until Americans will be scrambling to file their 2009 tax paperwork. Luckily, printable PDF versions of forms such as the 1040 can be downloaded for free from the IRS website.

March 18, 2010
Search Planet PDF
more searching options...







Download PDF Creator

PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools QuickPDF: The Unrivaled PDF Developer Toolkit

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories