Highlighted

alert for required fields before proceeding to next page

New Here ,
Aug 11, 2020

Copy link to clipboard

Copied

Complete form newbie, so please redirect me, as this has to already be covered, but I've not found it yet...

I managed to get my head round the javascript for dependent dropdowns thanks to you guys, so I'm hoping you'll be able to get me sorted for this.

I would like the required fields on each page of my form to be checked (and highlighted somehow if possible) where they have been left empty or unselected (combinations of text fields, check boxes and radio buttons on most pages), when the user clicks the 'next' button to advance to the following page.

 

Also if anyone can tell me if it's possible to have a message pop up if the form user selects 'Withdraw document' or 'Superseded document' from the Type of Change dropdown that says something like "complete Superseded By field"???

 

I've attached the latest draft  - started adding fields to Page 2. Form originally created in PowerPoint and has some actions associated with buttons already from that source.

 

Greatful for any and all support or redirection provided.

Izzi

Topics

How to, PDF forms

Views

87

Likes

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

alert for required fields before proceeding to next page

New Here ,
Aug 11, 2020

Copy link to clipboard

Copied

Complete form newbie, so please redirect me, as this has to already be covered, but I've not found it yet...

I managed to get my head round the javascript for dependent dropdowns thanks to you guys, so I'm hoping you'll be able to get me sorted for this.

I would like the required fields on each page of my form to be checked (and highlighted somehow if possible) where they have been left empty or unselected (combinations of text fields, check boxes and radio buttons on most pages), when the user clicks the 'next' button to advance to the following page.

 

Also if anyone can tell me if it's possible to have a message pop up if the form user selects 'Withdraw document' or 'Superseded document' from the Type of Change dropdown that says something like "complete Superseded By field"???

 

I've attached the latest draft  - started adding fields to Page 2. Form originally created in PowerPoint and has some actions associated with buttons already from that source.

 

Greatful for any and all support or redirection provided.

Izzi

Topics

How to, PDF forms

Views

88

Likes

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
Aug 11, 2020 0
New Here ,
Aug 11, 2020

Copy link to clipboard

Copied

If you'd like to see the PowerPoint file, I can upload that too. Let me know. Tks

Likes

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
Reply
Loading...
Aug 11, 2020 0
Adobe Community Professional ,
Aug 11, 2020

Copy link to clipboard

Copied

Yes, I think all the things you've mentioned are possible through scripting.  

Here's an article on using the Alert Box

https://acrobatusers.com/tutorials/popup_windows_part1/

 

"required" is a property of the field object. So just add a script to your Next button that searchs for fields that have both the "required" property set to true and are on the page in question.   

One way to do this might be to prefix all the field names on each page with "PageX." This will group all the fields on that page for easier access. But only do this if the group naming won't interfere with other features on the form. 

 

 

Likes

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
Reply
Loading...
Aug 11, 2020 0
Most Valuable Participant ,
Aug 12, 2020

Copy link to clipboard

Copied

I don't recommend you do that. It can be very annoying for the users. It's enough that you've set the fields as required. That means the users won't be able to submit the form back to you until they are filled in, but you have to use a Submit Form command for that, not just a mailto link.

Likes

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
Reply
Loading...
Aug 12, 2020 0
New Here ,
Aug 19, 2020

Copy link to clipboard

Copied

Hi try67,

I need the person who completes the first 6-7 pages (user 1) to submit the form for approval and then I need the approver (user 2) to submit the form to one of two e-mail addresses (if document is of type X, send to #1, if  document is of type Y, send to #2).

I can't see how to attach the latest version of the form so you can see better what I'm meaning (the form has been revised since I originally attached it).

If I have required fields that need must be completed for User 1 to submit the form for approval but not the fields that User 2 must complete, is there a script to tell Acrobat to only pay attention to required fields in pages 1-7 and ignore any required fields that the User 2 completes on say page 8?

Thanks for your assistance,

Izzi

Likes

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
Reply
Loading...
Aug 19, 2020 0
New Here ,
Aug 12, 2020

Copy link to clipboard

Copied

Hi thank you both for your insights and suggstions.

The form isn't submitted to a single person, but to whomever is the appropriate Document Authority for the document being created, updated or withdrawn, once the Document Owner has reached either page 6 or page 7 (depending on the type of document they wish to have published).

I see I can collect form data as attachments to email, using mailto: followed by the email address. Is there some coding you're aware of that allows the document to be attached to a blank e-mail?

Another issue I've encountered whilst trying the options suggested is that as the form is 90% filled before submitting for approval, it would always have one final required field for the Document Authority to complete and that's the sign-off (which I've set to use the built-in e-signature option).

Any suggestions how I get the submit form to ignore that one final required field, or am I expecting too much?

Perhaps I need a different route?

Going through these steps has highlighted that I'd missed the first 'submit' (e-mail form to approver) off. I'll upload a new version of the form when I've done that. I need to get on the road now.

I look forward to seeing if you have any gems for me as soon as I can get back online. Thank you x

Likes

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
Reply
Loading...
Aug 12, 2020 0
Adobe Community Professional ,
Aug 12, 2020

Copy link to clipboard

Copied

Here's an article that explains the email options for scripting.

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/

 

An unfilled required field will always block a form submit. So either don't use a submit (which ignores all required fields) or turn off the required property.  

 

What you are saying is that there are different required fields for different form fillers. 

One way to handle this situation is to have a different submit button for each user. Then use a script on the button to set the required properties on the appropiate fields before the submit. 

Another option is to make this an Adobe Sign form. Adobe Sign handles different requirements for different users.  

Likes

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
Reply
Loading...
Aug 12, 2020 0
New Here ,
Aug 19, 2020

Copy link to clipboard

Copied

Hi Thom - thanks for sharing your article. I'm a complete newbie at all things Javascript and I just can't follow it. I've had another coffee and tried again; still not any clearer as to whether I can get a solution that will work for my form.

 

Re: "One way to handle this situation is to have a different submit button for each user."

User 1 fills out all fields up to either page 6 or page 7 (as described earlier). They then need to submit the partially completed for to an Approver, who completes the last part of the form whereby they confirm that they are satisified with User 1's entries on the form and that Approver then e-mails the form to one of two possible e-mail addresses.

 

Could you possibly tell me if one of the options in your article is appropriate for this and which one that is and perhaps give me a bit more steer on where in the form I need to create the wonderful Javascript magic?

 

Thanks in advance,

Izzi

Likes

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
Reply
Loading...
Aug 19, 2020 0
Adobe Community Professional ,
Aug 19, 2020

Copy link to clipboard

Copied

Any of the options for scripting an email that sends the pdf as an attachment are suitable for using in a  submit buttons. Whether there is one or 10, is not important. To handle multiple submits on a form you need a script on each submit button that first validates the required feilds for that submit, disables the fields for that submit, and enables the fields for the next submit button. This is not a difficult scripting task, but it does require some work.

 

  

Likes

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
Reply
Loading...
Aug 19, 2020 0
New Here ,
Aug 20, 2020

Copy link to clipboard

Copied

I'm not afraid of work, I don't follow what you've written in the article at all. Why would you not just say which one of the scripts you've provided is the best one for what I need? As a complete beginner, that's the level of guidance I need. I'm not asking you to populate the script for me, I want to do that myself, so that I can learn. When you know what you're doing, it's easy to not understand how someone else is struggling with the information you've written, because it makes sense to you. I'm not entirely sure I can follow your replies either as you don't acknowledge that you've understood what I'm trying to achieve, which leaves me wondering if you have.

Likes

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
Reply
Loading...
Aug 20, 2020 0
Adobe Community Professional ,
Aug 20, 2020

Copy link to clipboard

Copied

Since you are emailing the entire document, use the "doc.mailDoc" function. This function is different than the submitForm function, in that it does not check required fields. It just mails the PDF. You should be able to pass empty strings for the subject and body. 

 

 

 

 

 

Likes

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
Reply
Loading...
Aug 20, 2020 0