Skip navigation
SnorkelNut
Currently Being Moderated

Need checkboxes in PDF that create a list of those items later in the same PDF

Apr 11, 2012 9:11 AM

I asked this in Indesign, but they said to ask again here.

 

Hi Folks,

 

I create PDF travel guides in indesing and turn them into PDF.  I also have Acrobat. 

 

For each location in the travel guide I would like to have a checkbox available on the page, next to the title, that a reader could check if they decide they want to visit that location/activity.  Then, those title results would populate a list in the same PDF eBook, in something like a notes section in the end of the document, so that the user has an easy list to view of what they decided to visit.  They should be able to uncheck them later so that they can create new lists. 

 

Is this possible in a PDF?

 

Thanks for your help.

 
Replies
  • George Johnson
    11,676 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 11, 2012 10:34 AM   in reply to SnorkelNut

    Sure it's possible. The easiest way to set this up would be to set the text you want associated with each check box as the export value of the check box, and set up a multiline text field in the notes section with a custom calculation script. It might look something like this:

     

    // Custom Calculate script for text field
    var i, v, s = "";
    
    // Loop through the check boxes and get text if they're selected
    for (i = 1; i < 11; i += 1) {
    
        // Get the value of the current check box
        v = getField("checkbox" + i).value;
    
        // Add current checkbox value to summary string, separating each with a carriage return
        if (v !== "Off") {
            s += v + "\r";
        }
    
    }
    
    // Set this field's value
    event.value = s;
    

     

    This script assumes the check boxes are named checkbox1, checkbox2, ...checkbox10, so you'd have to modify to match your form. The field's calculate script will get triggered whenever any field value changes, so it will get updated each time a check box is selected or deselected.

     
    |
    Mark as:
  • George Johnson
    11,676 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 11, 2012 10:34 AM   in reply to George Johnson

    Note: I had to correct a typo, so be sure to look at the latest version of the script.

     
    |
    Mark as:
  • George Johnson
    11,676 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 11, 2012 12:12 PM   in reply to SnorkelNut

    Yes, you will need to create the check boxes and text fields in Acrobat after you create the PDF.

     

    What I suggested was to combine all of the text for each selected check box into a multiline text fields, with each separated by a carriage return. This would not easily allow a link back to the page with a corresponding check box.

     

    You could instead set up several single line text fields in the summary section and next to each place a button that when clicked would link back to the check box. The programming would be more involved and would depend on exactly how oyu want it to behave, but certainly possible.

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 9:29 AM   in reply to George Johnson

    Hi George,

     

    I have a fairly limited knowledge of coding and was hoping you could break down the process you outlined above. I would really appreciate it if you could run through an example of setting up one checkbox and one corresponding text field with all the javascripts involved.

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 9:55 AM   in reply to SnorkelNut

    If you have figured out a way to easily do this, can you please share?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points