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

Create blank field based on the Quanity of another field

New Here ,
Jun 07, 2023 Jun 07, 2023

Greetings!

 

I am trying to create a form / questionair that would ask the user for the quanity of widgets and based on that entry, create the same quanitity of fields that the user can then provide the information for each widget needed. 

Example: How many widgets do you need: 4

The form would then display 4 fields for the user to complete. [Widget1 name  and number], [Widget 2 name and number], [Widget 3 name and number], [Widget 4 name and number] 

 

Is this possible?

TOPICS
How to , PDF forms
166
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 ,
Jun 07, 2023 Jun 07, 2023

Hi,

 

This is possible with a combination of a JavaScript script and hiding / unhiding the widgets.

 

What type of widgets are you trying to implement (i.e. radio buttons, checkboxes, an action button) ??

 

However, the method suggested above is limited to whatever field objects and widgets you can fit on desire a page since Adobe Acrobat doesn't reflow page content.

 

In addition, a more complex  scripting would be needed if your intention is to actually instruct such script to create X amount of field objects with a specific width, height, orientation, and position in relation to other PDF elements on said page. That is not a trivial task.

 

One easy way for me, for example (and assuming that I have already created 10 hidden field objects on that page), is to provide the user with options from 1 through 10 to choose from using a dropdown menu.

 

Let's say the user selects "5" from the given list, then it is easier to elaborate a script that will make visible 5 widgets or field objects.

 

 

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 ,
Jun 07, 2023 Jun 07, 2023
LATEST

As mentioned, this is possible if you create the fields in advance, hide them and then show them based on the user's input. But that would mean that there will be a white gap on the page when those fields are hidden. Also, it would mean you will need to limit the user's reply to the number of fields you created. If you want to allow them to enter any number you would need to place those fields on a (hidden) Template page and then spawn copies from it to match the number the user entered. For example, if the Template has 20 rows and they entered "450" you would need to spawn 23 copies of the page, and hide the last 10 rows on the final one.

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