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

Check all that apply. Is it possible to make my form do this with checkboxes?

Explorer ,
Jan 30, 2016 Jan 30, 2016

I am making an option for possible blood-borne diseases.  It needs to be a required field so we know they didn't miss it.  I currently have it set as a checkboxes.  I know I could make it as a dropdown and people could hold the shift/control key and select the options necessary, but not everyone gets that.  So, I would like for it to be checkboxes.. quick and simple, right?
this

So, how can I make something like this work.

Do you have any of the following? (Client privacy will be protected as per HIPAA laws):

[___] None [___] Hep B [___] Hep C [___] HIV

[___] Other - Specify ____________________________________________________

Here is what the InDesign panel looks like

indesign-panel.jpg

I saw nothing in there about allowing multiple choices. And when I went in to edit the form in Acrobat, I saw nothing about multiple choices.

Any help is greatly appreciated.

Kim

TOPICS
Acrobat SDK and JavaScript , Windows
2.2K
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

correct answers 1 Correct answer

Community Expert , Jan 31, 2016 Jan 31, 2016

For example, it can be something like this:

if (this.getField("CheckBox1").value=="Off" && this.getField("CheckBox2").value=="Off" && this.getField("CheckBox3").value=="Off") {

    app.alert("You must first select one of the check-boxes before submitting the file.");

} else {

    this.mailDoc({cTo: "me@server.com"});

}

Translate
Community Expert ,
Jan 30, 2016 Jan 30, 2016

If you don't give the check-boxes the same name then you'll be able to select multiple ones at the same time, as they won't have anything to do with one another. However, you can set them as required but it won't be enforces. You'll need to use a script to enforce that.

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 30, 2016 Jan 30, 2016

PS. I highly recommend creating fields in Acrobat only. I've encountered all kinds of issues with PDF form fields created in ID.

Do the layout in ID but the actual fields in Acrobat.

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
Explorer ,
Jan 30, 2016 Jan 30, 2016

try67 wrote:

PS. I highly recommend creating fields in Acrobat only. I've encountered all kinds of issues with PDF form fields created in ID.

Do the layout in ID but the actual fields in Acrobat.

Really!?  I was always taught to do it from within ID.  I have never had a problem, but my forms have not been super difficult.

Kim

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 30, 2016 Jan 30, 2016

There were several times that I encountered files with strange problems relating to fields and it turned out to be because they were created in ID.

We had to remove all of the field and then re-do them in Acrobat from scratch to get it working correctly. Also, in ID you don't have access to the full set of properties and actions that are available in Acrobat.

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
Explorer ,
Jan 30, 2016 Jan 30, 2016

try67 wrote:

If you don't give the check-boxes the same name then you'll be able to select multiple ones at the same time, as they won't have anything to do with one another. However, you can set them as required but it won't be enforces. You'll need to use a script to enforce that.

Hmm.. Is there a script that allows you to make the group accept multiple answers?

Kim

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 30, 2016 Jan 30, 2016

You don't need a script. I just explained how to do it...

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
Explorer ,
Jan 30, 2016 Jan 30, 2016

try67 wrote:

You don't need a script. I just explained how to do it...

You said you can create them individually, but then you cannot enforce the required, but that can be done with a script.  So, maybe what I need is if nothing is checked, then I need to point it out that something must be selected... I am just not sure I know what that code should be.  I will take a look at the links BR gave me a week or so ago, but if I can't figure it out, do you have any suggestions on where else I can look?

Thank you again for your time.

Kim

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 31, 2016 Jan 31, 2016
LATEST

For example, it can be something like this:

if (this.getField("CheckBox1").value=="Off" && this.getField("CheckBox2").value=="Off" && this.getField("CheckBox3").value=="Off") {

    app.alert("You must first select one of the check-boxes before submitting the file.");

} else {

    this.mailDoc({cTo: "me@server.com"});

}

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