Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multistep webform page navigation #26172

Merged
merged 1 commit into from Apr 29, 2024

Conversation

rutwikhdev
Copy link
Contributor

@rutwikhdev rutwikhdev commented Apr 26, 2024

Steps to reproduce:

  1. Create a multistep webform with a child table in one of the steps
  2. Edit using the child table edit button option. Try adding a few fields
    Screenshot from 2024-04-26 15-18-25
  3. Hit next. The form will be submitted without going to the next page/step.
    image

Problem:
Consider a webform with 3 pages. The pages will have the following classes,

p1: form-page
p2: form-page page-break
p3: form-page page-break

form-page is used for selecting pages for navigation.

If any one of these pages have a child table entry the view will be broken because the child-table-edit dialog uses the same layout component as webform and hence when it's rendered the components with form-page as class are duplicated multiple times. So on hitting the edit button for child table the pages would look something like this,

p1: form-page
    form-page (child table)
    form-page (child table)
    ...
p2: form-page page-break
p3: form-page page-break

Fix: Using page-break classname(since page-break is unique for webform pages) for navigation between pages (the first page is still form-page, since there is no page-break before that)

no-docs

@rutwikhdev rutwikhdev requested a review from a team as a code owner April 26, 2024 09:55
@rutwikhdev rutwikhdev requested review from akhilnarang and removed request for a team April 26, 2024 09:55
@rutwikhdev rutwikhdev added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 labels Apr 29, 2024
@rutwikhdev rutwikhdev merged commit 2415936 into frappe:develop Apr 29, 2024
25 checks passed
rutwikhdev added a commit that referenced this pull request Apr 29, 2024
…-26172

fix: multistep webform page navigation (backport #26172)
akhilnarang added a commit that referenced this pull request Apr 30, 2024
…-26172

fix: multistep webform page navigation (backport #26172)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants