Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

self-referential forms

Community Beginner ,
Jan 25, 2023 Jan 25, 2023

Say I have a form that asks for name, address, etc at the beginning. Is there a way to take that "name" value (after it was input) and insert it into a paragragh somewhere else in the form, say on blur? Like if I was creating a photographic release, and someone types their name in the form and then their name appears down in the legalese stuff.

TOPICS
PDF forms
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jan 25, 2023 Jan 25, 2023
LATEST

Great!

 

Yes, unfortunately Adobe Acrobat Pro doesn't reflow page content as older PDFs that used to be developed with Adobe LiveCycle.

 

But, with some creativity you can make a PDF appear as dynamic using Acrobat's built-in features combined with some JavaScript.

 

Hiding and unhiding read-only fields while the user interacts with other field objects will offer a nice experience for the users in the absence of text or page re-flow.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2023 Jan 25, 2023

Yes, that can be done with some basic JavaScript.

 

But can you elaborate in more detail where the name is typed in?

 

Is the name already typed in by the user in a text field object separate  from an address text field?

 

OR, is the name and address typed in altogether as a single paragraph in a single multi-line text field?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2023 Jan 25, 2023

It's a basic [company], [name], [address], [city], etc.  form to gather info.  Below that are paragraphs of text telling the person the benefits of their sponsorship (which are conditional on the value of the sponsor donation).  But I can't figure out how to insert the sponsor name and then reflow the paragraph text. 

 

Thank you. 

I'm familiar with creating forms for print, not interactive acrobat files, but I have some javascript experience so I should be able to figure it out.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2023 Jan 25, 2023

Let's say that the paragraph is displayed as a read-only multi-line text field.

 

You may declare in a variable, for example,  the whole terms and conditions paragraph and include the name field value with something like this:

 

 

var name = this.getField("name").valueAsString;

var terms = "Terms and Conditions for " + name + " apply: \n\n1. Payment terms\n2. Cancelling service\n3. Subscription and Refunds";

if (name !=="") {

event.value = terms;

} else {

event.value ="";

}

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2023 Jan 25, 2023

This was super helpful.  I hadn't thought of making the "terms" a multi-line text box.  I was trying to insert it into an existing paragraph of the form.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2023 Jan 25, 2023
LATEST

Great!

 

Yes, unfortunately Adobe Acrobat Pro doesn't reflow page content as older PDFs that used to be developed with Adobe LiveCycle.

 

But, with some creativity you can make a PDF appear as dynamic using Acrobat's built-in features combined with some JavaScript.

 

Hiding and unhiding read-only fields while the user interacts with other field objects will offer a nice experience for the users in the absence of text or page re-flow.

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