Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102846

Able to Select "Choose an Option" as valid choice on forms

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1.X
    • Fix Version/s: 7.1.X
    • Component/s: Forms
    • Labels:

      Description

      Steps to reproduce

      1. Start a clean bundle of Liferay DXP 7.1 installed with dxp-13 and hotfix-2521.
      2. Go to Content -> Forms -> Options -> Data Providers and create a new Data provider with the following fields:
            Name: restcountries
            URL: https://restcountries.eu/rest/v2/region/{region}?fields=name
            User name: test
            Password: test
            Inputs - Label: region
            Inputs - Parameter: region
            Inputs - Type: Text
            Outputs - Label: name
            Outputs - Path: $..name
            Ouputs - Type: List
        
      3. Create a new form with the following field names and field types: Region (Text), Countries - From Autofill (Select from List), and make all the fields required
      4. Add the following rule to the form: If Region is not empty, Do Autofill from Data Provider: restcountries, region: Region, name: Countries
      5. Add a forms portlet to a page and add this form
      6. Type polar into region, and verify that Antarctica automatically populates
      7. Select "Choose an Option" in the Countries line
      8. Submit the form

      Results of Testing

      Expected Results: The form should not submit as "Choose an Option" is not a valid choice
      Actual Results: The form submits, and the last selected option (Antarctica) is submitted as the value for "Choose an Option"

      Errors/Logs

      None

      Master

      Not Reproduced - 8b302b735b6ad41a2613fe502dab0e86834daa98

      Branch

      Reproduced - 4a6a341c15ef78a38cb3efbf2c8381a13c383ee4

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 weeks, 5 days ago

                Packages

                Version Package
                7.1.X