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

Autofill Rule does not reset to empty option list

    Details

      Description

      Steps to Reproduce:

      1. Create a Public Content Page
      2. Add Form widget > press Publish
      3. Go to: CP > System Settings > Data Providers > Add checkmark to 'Access Local Network' > Press Update
      4. Go to: Content and Data > Forms > Data Provider tab > Click +
        Enter this data (for Countries):
        Name: Countries of the World
        URL: http://localhost:8080/api/jsonws/country/get-countries/
        User Name: [email protected]
        Password: adminuserpass
        Timeout: 1000
        Outputs Label: Country Name
        Outputs Path: $..nameCurrentValue;$..countryId
        Outputs Type: List
      5. Press Save
      6. Add a second Data Provider (for States/Regions)
        Name: States Regions Provider
         
         URL: http://localhost:8080/api/jsonws/region/get-regions/countryId/{countryId}
        

        User Name: [email protected]
        Password: adminuserpass
        Timeout: 3000
        Inputs Label: CountryId
        Inputs Parameter: countryId
        Inputs Type: Text
        Outputs Label: State Name
        Outputs Path: $..name
        Outputs Type: List

      1. Press Save
      2. Go to: Content and Data > Forms > Click + to create a new form
      3. Add a 'Select From List' Field to the form
        Field Configuration
        Label: Country
        Create List: From Data Provider
        Choose a Data Provider: Countries of the World
        Choose an Output Parameter: Country Name
      4. Press Save
      5. Add another 'Select From List' Field to the form, this time dragging it over the previous 'Select From List' Field so they become grouped
        Field Configuration
        Label: States/Regions
        Create List: From Autofill
      6. Press Save
      7. Create a rule to provide the States/Regions for the country selected (see screenshot 03.)
        Click the Rules tab > Click +
        Configure Rule as per below:
        If [Country] [Is Not Empty]
        Do [Autofill] From Data Provider [States Regions Provider]
        CountryID [Country]
        State Name [States/Regions]
      8. Press Save
      9. Save and Publish the Form.
      10. Open the Content Page for editing > Configure the Form widget to display the form > Press Publish
      11. Go to the page
      12. Select United States from the 'Country' list
        Note the States/Regions are populated in the second field list
      13. Select Afghanistan as the Country

      Expected Result
      The regions of Afghanistan are populated if they are included in the data provider or alternately the States/Regions list shows as empty.

      Actual Results
      Though Afghanistan is selected as the country, the States/Regions remain those of the US.

        Attachments

          Activity

            People

            Assignee:
            leticia.chiu Leticia Chiu (Inactive)
            Reporter:
            lino.alves Lino Alves
            Participants of an Issue:
            Recent user:
            Rafaela Nascimento
            Engineering Assignee:
            Lino Alves
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              44 weeks, 1 day ago

                Packages

                Version Package
                7.3.10.3 DXP SP3
                7.3.X
                7.4.13 DXP GA1
                Master