Closed (duplicate)
Project:
Webform
Version:
7.x-4.0-alpha6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2013 at 16:15 UTC
Updated:
2 Nov 2014 at 19:59 UTC
Jump to comment: Most recent
Comments
Comment #1
quicksketchHi there! Currently this functionality is not supported (unfortunately). I'd like to see this added to the module through the API, even if it's not a built-in option in the core module. To add this, we need to enhance the Drupal.webform.conditionalCheck() function in the webform.js file. Right now you can see that it's hard-coded in there whether or not we hide/show a component:
What we need to do here is make this section pluggable. I think it would be logical for us to fire an event here, such as finding the parent "form" tag and then triggering a custom event:
Then any module could respond to this event (and Webform would respond to it itself also for show/hide):
This code probably wouldn't work without modficiation, I'm just dumping my ideas out on how this should probably work. I'm moving this to a feature request because I think it would be a nice enhancement to our API.
Comment #2
quicksketchI occurred to me the other day that the conditional system could be used to set custom validation messages. That would drastically improve users ability to set rules around validation and would almost entirely eliminate the need for the Webform Validation module.
Comment #3
quicksketchRelated request: #2085623: Change label based on condition
Comment #3.0
quicksketchadded image link
Comment #4
danchadwick commentedReally a duplicate of #2352373: Set component values based upon tokens and/or other conditional values at this point.