Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2016 at 15:10 UTC
Updated:
25 Aug 2017 at 16:45 UTC
Jump to comment: Most recent
When you have a multistep form then the conditions for field states might use the fields from other (mostly logical previous pages). In this case the conditions are not evaluated because this is done with javascript and it has no idea about the fields from other pages.
In this module I tried to create WebformHandler that will try to evaluate the conditions.
I think this feature may be useful.
Please help to develop it.
The initial code could be found here https://github.com/artemvd/webform_crosspage_conditions
Comments
Comment #2
a.dmitriiev commentedI tried to find the discussion where this topic is referenced, but with no luck. Maybe somebody can also point the related issue to me.
Thanks.
Comment #3
jrockowitz commentedI added a reference to this project to the list of Webform Add-Ons. Hopefully, this will encourage more people to get involved.
Comment #4
xlith commentedI tried the addon on my site by it doesn't work. Maybe i did something wrong.
Comment #5
a.dmitriiev commentedthank you @jrockowitz
Comment #6
mmaciusowicz-rr commentedThis is possibly something that can be addressed together with server-side conditional validation. Firstly, this would help prevent situations when validation is applied to fields that are not properly displayed. Secondly, both issues seem to be related to identifying when a given state and condition is applicable, and then modifying the element accordingly. I have done some work on a patch that may help address both issues: https://www.drupal.org/node/2875949#comment-12198843
Comment #7
jrockowitz commented@see #2900719: Server side Conditional Logic using #states API