Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2015 at 21:50 UTC
Updated:
14 Apr 2015 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danchadwick commentedThis patch enhances WebformConditionals::executeConditionals() to also keep track of the visibility of the components on each page. This data is store and later used to determine whether a component should be shown or not (WebformConditionals::componentVisibliity), or whether the whole page should be show (WebformConditionals::pageVisibility).
It retains the trinary distinctions of a) always shown, b) always hidden, and c) currently hidden, but on same page as a source, should should be included on the page and hidden by javascript.
Using WebformConditionals greatly simplifies and unifies the code for checking whether a component should be included on a page. As a side benefit, it also greatly simplifies the code that handles Prev/Next page, including skipping empty pages, always showing page 1 and always showing the preview page (if selected).
This patch must be applied after #1815996: Multiple target components for each conditional.
Comment #3
danchadwick commentedDarn testbot.
Comment #4
danchadwick commentedCommitted to 7.x-4.x.
Comment #6
danchadwick commentedPatch to be ported to D8. Of the four conditional patches, apply 2nd.
Comment #8
danchadwick commentedRegression. When deciding whether to display nested components in a submission (rather than a form), components which are currently hidden but are needed for the form because they might be displayed by a same-page conditonal are incorrectly displayed on the submission. The form is submitted -- it is now clear that they should be hidden.
Committed to 7.x-4.x
Comment #9
danchadwick commentedPatch to be ported to D8. Of the four conditional patches, apply 6th.
Comment #10
fenstrat#5 committed and pushed to 8.x-4.x.
Comment #13
fenstratCommitted and pushed #7 to 8.x-4.x. Thanks!