Skip to main content
Markarius
Inspiring
February 6, 2020
Answered

Dropbox on Checkboxes

  • February 6, 2020
  • 3 replies
  • 1353 views

Hello,

 

I have a dropbox called Sex, that has options for Male and Female.

on a different page, I have two checkboxes called CB_Sex, with different export value Male Female.

 

I need a script so that when dropbox selects male, it checks the checkbox for male and so on...

 

Also, I need a way to remove the checkboxes from the dropdown list. I can add another item to the checkbox.. say a single space, so that when that's selected, it would result in clearing any/all checkboxes.

 

Please help!

Thanks

 

This topic has been closed for replies.
Correct answer Markarius

Figured it out...  wasted hours in the process...

this.getField("Applicant Sex").value = event.value;

this.getField("Applicant Gender").value = event.value;

3 replies

February 21, 2020

thanks for the advice!

Markarius
MarkariusAuthorCorrect answer
Inspiring
February 16, 2020

Figured it out...  wasted hours in the process...

this.getField("Applicant Sex").value = event.value;

this.getField("Applicant Gender").value = event.value;

Thom Parker
Community Expert
Community Expert
February 17, 2020

How could you have wasted time? Didn't get figure out the solution? After pretty much being told how to do it.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ls_rbls
Community Expert
Community Expert
February 18, 2020

LOL!!  😂

 

Markarius is lucky that the PDF is only specifying sex type assigned at birth, and not gender, and gender identity for an Equal Employment Opportunity office.

 

I would like to see  how  you can get that one figured out, considering  the known 63 genders, plus 83 or more gender combinations of the new millenium.

Thom Parker
Community Expert
Community Expert
February 6, 2020

The strategy here is the same as your other post. Make the exports in the dropdown match the exports on checkbox, Make the export for the blank entry on the dropdown "Off". Then use a keystroke script to copy the dropdown to the checkbox. Look at the articles and the examples for sample scripts.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often