Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Progressbar shows all steps, even when they do not apply due to conditional rules
When pagebreaks are shown/hidden with conditional rules, the progressbar does not show that. It shows all possible pagebreaks as steps in the order configured.
Check pagebreak components for conditional rule compliance
The progress is largely based on the content of the $vars['page_labels'] array. Maybe the array items should be checked by _webform_client_form_rule_check() to make sure only available pagebreaks are shown.
Comments
Comment #1
DanChadwick CreditAttribution: DanChadwick commentedI think this is desirable. The progress bar would continue to grow as your progressed otherwise. However, it is themed, so you can do as you like.
BTW, _webform_client_form_rule_check() has been removed from the latest dev in preference to using WebformConditionals, the class.
Comment #2
keesje CreditAttribution: keesje commentedOk, clear.
I think it makes sense to interfere with the page_labels data before it reaches the theme. This would add more code logic to the themeinglayer than I would like, but it would be totally possible. I'm looking at a simple glue module right now that hooks into preprocess_webform_progressbar.
Thanks for pointing to the removed function, saves me some work :-)