I have created a form with YES and NO check boxes. If user checks YES, they need to provide written reason. Is there a way to "force" user to enter text into text box if they check the YES check box?
Thanks,
Toyro
Solved! Go to Solution.
Views
Replies
Total Likes
Take a look at the attached. It contains some simple logic to encourage form fill based upon a "Yes" selection. There are many different ways to approach this issue.
Steve
Views
Replies
Total Likes
You cannot force any behaviour considering a user can simply choose to ignore submitting, printing, or saving the form. The best you can do is to encourage form completion through form validation; setting focus on the text field, error messages on field exit, on print events, etcetera.
Views
Replies
Total Likes
yes, that is why i put 'force' in quotes! (forgive me if I use the "incorrect" words, I am quite new at this!)
Ok, this is what I am trying to accomplish - and I am also new to scripting - I did read a previous post from palacfanatic that seems like it may have similar, not exact, situation (this field is mandatory...)
I have completed forms where if I check YES I would need to provide info in a text box, if i didn't provide that info then I would not be able to continue completing form (error message keeps coming up that I need to provide info) unless I changed the YES to a NO. Is there a way to do that? (make a text box mandatory if YES box is checked?) or is my question still too general?
thanks, toyro
Views
Replies
Total Likes
Take a look at the attached. It contains some simple logic to encourage form fill based upon a "Yes" selection. There are many different ways to approach this issue.
Steve
Views
Replies
Total Likes
PERFECT! This is what I need!
THANK YOU SO MUCH!
Views
Replies
Total Likes
Can you help me out? I am trying to do this backward. I want a check box that is always checked. It is when the user unchecks the box that they need to enter in a comment. Can that be done?
Thanks!
Jodi
p.s. I am a beginner to LiveCycle designer and scripting so please be patient
Views
Replies
Total Likes
Hi Jodi,
Absolutely. I will forward a sample shortly.
Steve
Views
Replies
Total Likes
Jodi,
Take a look at this. Let me know if you need further assistance.
Steve
Views
Replies
Total Likes
Hi Steve,
It isn't working for some reason. I don't know if it is because I only have the one field and then go to send email? Does the form need to be saved as a dynamic PDF? I attached to see if you could see what I have wrong. Thanks for all the help!
Jodi
Views
Replies
Total Likes
Hi Jodi,
Yes, it has to be saved as a dynamic PDF.
Additionally, there are some name mismatches in your form so the script was failing. My script defined page 1 as 'page1' while your form defined page 1 as 'Page1'. I renamed your form page 1 to 'page1' and the script worked fine.
I would recommend enabling the debugger in Acrobat for form developement. See Edit > Preferences and enable the following:
I added an additional button with some script on the button 'click' event.
The purpose is to intervene in the submission process, in your case submitting by email. With a single submit button the email dialogue fires regardless of failed form validation. By introducing a second button you can do form validation before enabling submission. The attached form has a visible button called 'submitBtn' and your original 'Submit By Email' button which is declared as 'invisible'. My 'submitBtn' is labelled 'Submit By Email'. When the button is clicked is does form validation. If validation succeeds, I call form1.page1.Button1.execEvent("click"); to submit to the email address attached to 'Button1'.
Take a look and see if it fits your requirements.
Steve
Views
Replies
Total Likes
This is so cool! This is exactly what I need. There is so much that I have to learn.
Thanks tons!
Jodi
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies