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

DanChadwick’s picture

Status: Active » Closed (won't fix)

I 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.

keesje’s picture

Ok, 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 :-)