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

Acrobat clickable text fields?

Community Beginner ,
Jan 25, 2022 Jan 25, 2022

Hello!

I was wondering if it is possible to create a pdf document that has yes/no/n/a questions that you can click on to select your answer? Say for instance, Question 1 is...Is the sun hot? then there are the options of yes   no    and n/a. Can whoever is filling out the form, click the answer Yes and it highlights it to a color to show that was their answer? Any help would be greatly appreciated. Thank you in advance!

TOPICS
Edit and convert PDFs , How to
822
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, 2022 Jan 25, 2022

If you wish for user to click on words, you could use buttons instead of text fields and set button label to be answer.

Example:

Lets say you create 3 buttons (we will name them "B1", "B2" and "B3") .

1. Select 'Prepare form' tool and right click on button and select properties, go to 'Appearance' and set border color to 'No color'.

2. To set answer as label, Select 'Prepare form' tool and right click on button and select properties, go to 'Options' tab and select 'Layout' to be 'Label only' and where it say 'Label' input your answer (Yes, No, or N/A).

3.  Now we will set script so when button is clicked it will change border color to red.

To put script, go to button properties -> Actions tab and select 'Mouse UP' then from dropdown pick 'Run a JavaScript' and click on 'Add' now paste script inside and click 'Ok'.

For button "B1" script:

event.target.borderColor = (color.equal(color.transparent, event.target.borderColor)) ? color.red : color.transparent;
this.getField("B2").borderColor = color.transparent;
this.getField("B3").borderColor = color.transparent;

 

For button "B2" script:

event.target.borderColor = (color.equal(color.transparent, event.target.borderColor)) ? color.red : color.transparent;
this.getField("B1").borderColor = color.transparent;
this.getField("B3").borderColor = color.transparent;

 

For button "B3" script:

event.target.borderColor = (color.equal(color.transparent, event.target.borderColor)) ? color.red : color.transparent;
this.getField("B1").borderColor = color.transparent;
this.getField("B2").borderColor = color.transparent;

 

If you wish to change fill color instead of border color, just replace 'borderColor' with 'fillColor' in scripts.

Here is working example:

https://drive.google.com/uc?export=download&id=1WXG7C_KRM2skcflVA5J_6SXbn2FrPaZZ 

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 26, 2022 Jan 26, 2022

This will work, but there's a problem with such an approach, namely that buttons don't have values. Say that later on you want to automatically grade this questionnaire or export the answers given to an Excel spreadsheet so they can be further analyzed, etc. You can't do it because the border color of a button is not a value and won't be exported. You will have to write a custom-made script for exporting those selections, which is not ideal.

 

I recommend not trying to re-invent the wheel, if it's not needed. Just use a group of check-boxes or radio-buttons with static text labels next to them. If you really want the text itself to be clickable then add buttons over those texts that assign a value to those input fields. That way you could export the values later on much more easily, if needed.

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 26, 2022 Jan 26, 2022

I wont need to export this to any sort of other format, so i plan on trying this out this week. Thank you for the suggestion! I appreciate the help!

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 26, 2022 Jan 26, 2022

Thank you for taking the time out to reply with this suggestion! Im going to try it out! You rock!

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
People's Champ ,
Jan 26, 2022 Jan 26, 2022

@Nesa Nurani's suggestion is good.

 

Note: You'll need to use Adobe Acrobat PRO DC to have the form tools. Acrobat Standard and Reader do not have those tools.

 

|    Bevi Chagnon   |  Designer, Trainer, & Technologist for Accessible Documents |
|    PubCom |    Classes & Books for Accessible InDesign, PDFs & MS Office |
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 26, 2022 Jan 26, 2022
LATEST

Acrobat DC Standard has also the form tools!

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 26, 2022 Jan 26, 2022

Thank you everyone!! I appreciate everyones feedback!

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