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

CONDITIONAL CHECKBOX JAVASCRIPT CODE ON PDF FORM

Community Beginner ,
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

849

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
Community Expert ,
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.

Votes

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
Community Expert ,
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

Votes

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
Community Beginner ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

Thank you! But how do I do this? And if the person check the checkbox and the attach file button show up, how do i know if the person has attached the file or not?

Votes

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
Community Expert ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

LATEST

I don't know, but other experts certainly know

Votes

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