[2.x] Multistep Form Framework

Created on 16 January 2024, 5 months ago
Updated 22 May 2024, about 1 month ago

This module provides a framework for creating multistep forms in Drupal >=8.x. While similar notable projects exists on Drupal.org, the goal of this project is to simplify the process of creating multistep forms for developers while maximizing flexibility in configuration. The module doesn't provide any kind of UI, it's created only for developers.

Module provides Yaml plugin system like *links.action.yml, where you can specify each step, and also replace/extend plugin itself. The benefit of such approach is:

  • One place to configure everything
  • You can specify whatever namespace you want for steps, which is good if you have a few multistep forms in one module because you will be able to sort them logically

How does this module differ from other community projects and examples?

The Webform and Forms Steps allow building of multi-step, wizard-style forms and provide a decent UI. If you need to deal with non-trivial tasks like multiple entities generation or some insane widgets then this module will give you full power.

--------------

There is example module that provides a decent example of how the module works. You can install it on bare bones Drupal to check it out.

Project link

https://www.drupal.org/project/multistep_form_framework

📌 Task
Status

Needs work

Component

module

Created by

🇺🇦Ukraine dinazaur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dinazaur
  • 🇮🇳India vishal.kadam Mumbai

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
    • For the time this application is open, only your commits are allowed.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications , Application workflow , What to cover in an application review , and Tools to use for reviews .

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool only once per application.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues .

  • 🇮🇳India vishal.kadam Mumbai

    For these applications, we need a project where, in at least the branch used for the application, most of the commits (if not all the commits) have been done from the person who applied.

    The purpose of these applications is reviewing a project to understand what the person who applies understands about writing secure code that follows the Drupal coding standards and correctly uses the Drupal API. We do not review a project to understand what the project maintainers as a group understands about those topics.

  • Status changed to Needs work 5 months ago
  • 🇮🇳India vishal.kadam Mumbai

    A project where the commits have been done by more than one person cannot be used for these applications.

    This application can only continue with another project where most of the commits (and preferable all the commits) have been done by the dinazaur.

  • Status changed to Needs review 5 months ago
  • 🇺🇦Ukraine dinazaur

    Hello, literally 2.x branch contains all my code. I deleted whole 1.x version when took the module. And reworked it from scratch. So this one commit is literally whole module

  • Status changed to Needs work 5 months ago
  • 🇮🇳India vishal.kadam Mumbai

    Please check the Contributor analytics for the 2.x branch. You'll see the commits per user.

    https://git.drupalcode.org/project/multistep_form_framework/-/graphs/2.x...

  • Status changed to Needs review 5 months ago
  • 🇺🇸United States cmlara

    @vishal.madam

    I believe the assertion is that https://git.drupalcode.org/project/multistep_form_framework/-/commit/dfc... while made on top of the code from 1.x, is a complete re-write, and any of the commits prior to it are not relevant. This would mean the “commit counts” are inaccurate and anything before they commit should be ignored.

    I haven’t looked like by line to be sure it wasn’t just a file rename or that a large number of files were not changed.

    Ideally 2.x would have been created as an “orphan” branch to make it more clear it was a code split however not strictly a requirement IMHO (and D.O prevents that from happening now)

    Unless we can assert the above commit just renamed files, this should probably be allowed to continue into the process. Especially since #3406966: [1.0.x] Time Clock has made it through the process and it originally started as all but a few lines of code could not be attributed to the applicant while this issue appears on cursory glance to have a sizable amount of changed line.

    Setting back to NR on the grounds this needs an actual line by line review to assert that it isn’t the applicants own commits.

  • 🇺🇦Ukraine dinazaur

    So here is a screenshot that shows commits in 2.x branch only.

    And here are explanations of what is inside 2.x branch. My initial commit contains 1941 additions and 406 deletions. I've removed all code from 1.x branch. So the 2.x contains all my code.

  • 🇺🇦Ukraine dinazaur

    Here is a link to related Drupal.org project ownership issue where I explained why I'm doing such a change. I just didn't want to make another module on Drupal.org and took the obsolete module and reworked it from scratch.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I checked the commit linked on comment #6. I would not say it is just renaming files. (I apologize, I checked the linked commit yesterday, but I forgot to comment about this application which seemed fine for me.)

  • 🇺🇦Ukraine dinazaur

    Changing the priority according to Application Review Timelines

    The priority of applications that have been waiting for a review for more than three weeks is changed to Major.

  • 🇺🇦Ukraine dinazaur

    Changing the priority according to Application review Timelines

    The priority of applications that have been waiting for a review for more than eight weeks is changed to Critical.

  • Status changed to Needs work about 1 month ago
  • The MultistepForm::prepareWizard should have it's parameters documented in the function doc comment.

    Your README.md does not follow best practices (headings need to be uppercase and sections are missing). See https://www.drupal.org/node/2181737 . Also, lines should be wrapped at 80 characters.

  • 🇮🇳India vishal.kadam Mumbai

    1. @branch is a wrong name for a branch. Release branch names always end with the literal .x as described in Release branches .

    2. Fix phpcs issues.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml multistep_form_framework/
    
    FILE: multistep_form_framework/modules/multistep_form_framework_examples/src/Form/BuyBookStep/Description.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     54 | ERROR | No key specified for array entry; first entry specifies key
    --------------------------------------------------------------------------------
    
    FILE: multistep_form_framework/README.md
    ------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------
     13 | WARNING | Line exceeds 80 characters; contains 89 characters
     16 | WARNING | Line exceeds 80 characters; contains 94 characters
     18 | WARNING | Line exceeds 80 characters; contains 194 characters
     21 | WARNING | Line exceeds 80 characters; contains 83 characters
    ------------------------------------------------------------------------
    
Production build 0.69.0 2024