Legacy Knowledge Base
Published Jun. 30, 2025

Skippable Pages containing Mandatory Fields Can Break Forms

Written By

Peter Nyiro

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I'm trying to complete a multistep form that's supposed to have seven steps.
  • Some questions on the form are required, while others are optional.
  • When I reach the final step and click 'Submit,' I get an error message saying 'This form is invalid. Check field.123456789.'
  • This error prevents me from successfully submitting the form.

Environment

  • DXP 7.3+

Additional Information

  • Forms often include pages that can be skipped based on specific conditions.
  • While this feature can improve user experience, it can also lead to unexpected issues.
  • One such problem arises when mandatory fields are placed on skippable pages.
  • If a user bypasses a page containing required information, the form cannot be submitted successfully.
  • This is due to missing data in the required fields, even though the user may not have realized they were skipped.

Resolution

There are several approaches to address the problem of mandatory fields on skippable form pages:

  1. Eliminate Page Skipping: Removing the ability to skip pages ensures that all required fields are completed before form submission.
    This approach guarantees data integrity but might increase form completion time.
  2. Remove Mandatory Fields: By designating fewer fields as required, the form can be submitted even if certain pages are skipped.
    However, this might compromise data quality as essential information could be missing.
  3. Provide Default Values: Assigning default values to required fields on skippable pages allows form submission without manual input.
    While convenient, this solution might not always accurately capture the intended data.
Did this article resolve your issue ?

Legacy Knowledge Base