Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would it be possible to hide empty steps? I have a 8 step multistep form, but some users completing the form won't have access to all the fields based on previous values entered (conditional visibility is controlled by a custom module). This results in some steps being entirely empty, with just next / back buttons. :(
Comments
Comment #1
stBorchertHm, good question.
In principle this should work using
hook_msnf_info_steps_alter()
(described in msnf.api.php) but an option "Hide if empty" in the step configuration would make sense.I don't make promises, but this feature should be included in the next release ;)
Comment #2
stBorchertCommitted: http://drupalcode.org/project/msnf.git/commit/8ce1fe2
There is now a new option "Hide the entire step if it contains no fields or none of the fields is accessible by the user." on the step configuration form. You can test this cloning the latest code from the module repository or wait for the next dev-version (it hasn't been updated yet).
I son't know when I will create the next release (maybe within the next days) so its available in dev only at the moment.
Comment #3
stella CreditAttribution: stella commentedawesome, thanks! I won't be working on that form again until Tuesday, but will give it a whirl then.
stBorchert++