CONDITIONAL CHECKBOX JAVASCRIPT CODE ON PDF FORM

New Here ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

hello there!

i am a Graphic Designer and NO NOTHING (JON SNOW) about javascript.

I am designing an application form and I want for the checkbox to turn "checked" IF the button "attach file" next to it have a file attached. I did find a javascript code to attach the file and it is working fine on the form, however it doesn't make the field required, which would be very important so people don't send incomplete applications (so there is that too...). And to make it easier for the applicant, since they will have to attach around 6 different files on each form, I would like to add a checkbox next to each "attach file" button so it indicates the user have already attached that file.  So in my mind it is a conditioned checkbox that conditions the checkbox to the button. If the user does not attach the file, checkbox keeps blank. So... Is it possible to do this and how do I do this/find the code for it? Thanks in advance. Any help is welcome!!

TOPICS
PDF forms

Views

135

Likes

translate

Translate

Translate

Report

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
Most Valuable Participant ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

This is quite tricky to implement, and using a check-box is not a good option because they are not validated when the file is submitted, even if set as Required, but it can be done using a text field, for example.

Likes

translate

Translate

Translate

Report

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
Adobe Community Professional ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

It would be easier to reverse the functionality: show the "Attach file" button when the user click on the checkbox.

 

Regarding the rest I have already answered your question here:

https://community.adobe.com/t5/acrobat/attach-file-button-required-field/td-p/11999424

Likes

translate

Translate

Translate

Report

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