First of all, thanks a lot for such great work.

A small issue, when the hidden fields are marked as mandatory, webform cannot be submitted without these fields checked.

Any idea who to overcome or change the mandatory fields when they are hidden?

CommentFileSizeAuthor
#23 webform_conditional_validation.zip1.76 KBwebadpro

Comments

tedbow’s picture

@Marat, yes for now you should not make hidden field mandatory.

This module is going to be incorporated in the regular webform module. There is an issue for it here #732114: Merge Webform Conditional into Webform - Conditional fields on 1 page. I trying to figure out how long this will take. So for now, I going to wait before I fix issues on this module.

Marat’s picture

Based on this comment #4 at #732114: Merge Webform Conditional into Webform (support for same-page conditional fields), the merging may take time. I think a temporary solution would be very helpful.

I am not sure but I think a small function to keep or change 'mandatory' => 0, 0 when the option is hidden can help.

theohawse’s picture

Yes, I second that, the temporary solution won't make merging these modules any more difficult than it is already.

CubicX’s picture

Any progress on this issue? I'm having the same problems and I really need a solution for this.
I looked at the code myself, but I could not find the problem (mainly because I'm not a very skilled JS programmer).

machete1’s picture

I see the importance of this, however, this needs to be an option. For example, I have fields that I only want to be mandatory IF they are displayed. If they are hidden, then they aren't required.

If a field is mandatory in all occasions why would you want to hide it in the first place? Maybe I am speaking out of turn, but this isn't making sense to me...

djmy’s picture

Priority: Minor » Major

I have the same issue, I have two radio buttons (A and B) and if someone clicks on "A" i want "C" to show up and be mandatory (this works fine), BUT the problem is if the user clicks on "B" then submits the webform, it ask that "C" be entered even though its not shown b/c the user clicked on "B". I want "C" to be mandatory ONLY if its shown (click on "A"). Please help! Its a great module, just had this issue that i really would like to find a solution for.

kacio’s picture

I solved this using the webform validation module: this works for me, I'm not sure it's ok for evrybody

chriscalip’s picture

Webform Validation module does not seem to have this functionality.
See http://drupal.org/node/917020

holydrupal’s picture

same issue here.

ayalon’s picture

I have the same issue.

theard’s picture

Subscribed

chaugi’s picture

Subscribed

tonypm’s picture

Subscribed.

tedbow’s picture

Status: Active » Postponed

I am currently fixing this. I will update module this week.

I am going to had a "Conditionally Mandatory" field under "Hidden Conditional". I will report an error if the user tries to make a field using this module hidden.

chaugi’s picture

Then there is no need for "When components are hidden their values are cleared." because values are not saved and gives the possibility for user try switching options without loosing entered info.

tonypm’s picture

I can't wait for this update tedbow!

lavamind’s picture

Subscribe.

3cwebdev’s picture

sub

drupalhopper’s picture

subscribe

webadpro’s picture

Hello All,

I have created a module that works with webform validate which sets the fields you want to Mandatory.

I'm simply not sure how to add it to drupal.org. If anyone could let me know how, Id be more than happy to share this module with you all.

Thanks

tedbow’s picture

@webadpro
Here is link that might help: http://drupal.org/cvs-application/requirements

tedbow’s picture

@webadpro, you might also want to see if the maintainer of webform validation would want to incorporate your changes into that module.

webadpro’s picture

StatusFileSize
new1.76 KB

Hi,

I'm not sure if I'm able to but until I actually get an CSV account and get the module the proper way Drupal guys wants it, I have attached it to this post and please let me know what you guys think and if you have any issues. I haven't done a lot of beta testing on it but it seems to be working well for my own usage. So as I said, please provide feedback.

Also, I haven't had the chance to write a README.txt file although this module is quite straight forward.

1- Upload
2- Activate the module
3- Go under Form Validations and a new option called "If Contional Field is checked make field mandatory" will be added to the list.

tedbow’s picture

@webadpro, Sorry I didn't understand your first comment. I thought you had made a module that works with the Webform Validationonly, not this one. I see now that your module involves both modules.

I just committed my latest changes to CVS. I think they should show up within 12 hours. You can see the latest files here.

Here is what my changes do:

Allows you to make a hidden conditional field "conditionally mandatory". If the field is shown then it will be required.
Also if you try make a hidden conditional field "mandatory"(regular webform mandatory) it will throw an error.

It think this is what yours does by using the Webform Validation. I would prefer to use my method because it doesn't require another module. Also it takes into account fields that are not hidden directly but hidden because they are inside a hidden fieldset

Since I have just made the changes I haven't received feedback from other users. I would like to see if my method works. If mine doesn't I will consider your method.

Now that I know that your module pertains to this one, I would suggest you not make a separate module. Lets wait and see feedback on my latest changes.

Thanks for your efforts.

webadpro’s picture

@tedbow, If you have added the feature directly in your module, that would work perfectly. I simply made a little module that allows me to do what I needed while this module wasn't offering it. Great job and keep it up.

tedbow’s picture

Assigned: Unassigned » tedbow
Status: Postponed » Needs review
lavamind’s picture

I tested the "Conditionally mandatory" feature that was added recently, and it seems to work for me! Thanks!

pixel8r’s picture

Same here, thanks!

tedbow’s picture

Status: Needs review » Closed (fixed)

thanks for the feedback. Closing

mechler’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc2

I don't see where "Conditionally Mandatory" is available as an option. Was this change ever committed? Is it included in 6.x-1.0-rc2?