I know with "Enable Conditional Logic" I can remove it from the form, but I don't want it removed, I still want it there, just not required.
I know with "Enable Conditional Logic" I can remove it from the form, but I don't want it removed, I still want it there, just not required.
I'm actually searching for this functionality too. I know you can conditionally remove/add a field based on an answer - so you could have two identical fields - one that is required, and one that isn't, and show/hide the field depending on the condition.
I'm hoping I can find/create a better solution.
Anyone have a reference to something like this, or a good head start on how to accomplish it using some Javascript and PHP?
Okay, I spent a bit of time on this. It could be prettier, but it worked for my needs.
I had a number of radio button fields, and some followup questions were only required if the initial question was a specific value. So, a sample Initial question would look like this:
1. Were you happy with the product you received?*
- Yes
- No
and a follow up question such as:
2. If you said "No", why was that?
- Poor quality
- Have another I like better
- None of your business!
So, here's how I solved it. Note, I did not have ajax enabled for these forms, so you'd probably need to do some more to get the fields to be valid using ajax. First some javascript:
and the PHP:
Hopefully that helps someone out. I've commented both files, but let me know if you need more help. If anyone wants to improve upon either script, that'd be great.