Closed (fixed)
Project:
Webform Validation
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
1 Mar 2013 at 18:55 UTC
Updated:
2 Jul 2022 at 07:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
liam morlandTo have form controls disabled by JavaScript, you need to use Clientside Validation together with Webform Validation. If I understand your request correctly, Webform Validation can do the needed validation, but doesn't disable selections where there are too many. I don't know if Clientside Validation can do what you want or not. Give it a try. A patch to Clientside Validation might be needed.
Comment #2
Anonymous (not verified) commentedAs far as I figured out, webform Validation can' t solve the third requirement.
Comment #3
liam morlandYes, that is the part that requires JavaScript. Webform Validation doesn't have any JS. That is all done in Clientside Validation.
Comment #4
Anonymous (not verified) commentedI don't think that disabling an option will be the hard part (indeed client-side, or just remove the option from the component programatically) I think the hard part would be the server-side validation of the number of options chosen.
This would be a query using the count of cid, or can this be done using the webform api??
Comment #5
liam morlandYou might have to write a custom validator. Webform Validation creates hooks that you can tie into from your own module so you only have to write a hook implementation declaring the validator and the validation logic.
Comment #6
Anonymous (not verified) commentedCould you please pint me in the right direction?
I have added my rule, and I can choose from it in the "Form Validation" tab. Problem is I can only choose from the components, not from the options inside a component.
So I have a component "Course 1", with options:
Sausage
Corn
Chicken
Beef
Pork
Burger
How do I get those to show up in de validation form to enter the maximum oumount of total order for each ingredient per course??
Thanks in advance
Comment #7
liam morlandThe configuration you can do through the UI is very limited. You will probably have to do your configuration in your code.
Comment #8
liam morlandPlease re-open if you need more help.