-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.3.X, Master
-
Fix Version/s: 7.3.10.3 DXP SP3, 7.3.X, 7.4.13 DXP GA1, Master
-
Component/s: Data Engine, Forms
-
Branch Version/s:7.3.x
-
Backported to Branch:Committed
-
Fix Priority:4
-
Git Pull Request:
Steps to Reproduce:
- Create a Public Content Page
- Add Form widget > press Publish
- Go to: CP > System Settings > Data Providers > Add checkmark to 'Access Local Network' > Press Update
- 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 - Press Save
- Add a second Data Provider (for States/Regions)
Name: States Regions ProviderURL: 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
- Press Save
- Go to: Content and Data > Forms > Click + to create a new form
- 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 - Press Save
- 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 - Press Save
- 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] - Press Save
- Save and Publish the Form.
- Open the Content Page for editing > Configure the Form widget to display the form > Press Publish
- Go to the page
- Select United States from the 'Country' list
Note the States/Regions are populated in the second field list - 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.