Autocomplete Fields with AEM Forms | Community
Skip to main content
September 9, 2022
Solved

Autocomplete Fields with AEM Forms

  • September 9, 2022
  • 2 replies
  • 1034 views

Hello everyone, I would like to create a form using AEM Forms that when the user enters their zip code automatically fills in the address fields.

Is there any way to do this natively or via API?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Pulkit_Jain_

@luanh2511 

Suppose the list of address fields against zip codes is limited. In that case, you can write a servlet to list the addresses against codes as elaborated here[0] (a similar use case) and then make an AJAX call from the form to the servlet

OR,

if the data might change frequently, you can use FDM[1][2] to prefill data based on an input field.

Also, this can be done using an external API anyways.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-64/forms/customize-aem-forms/dynamically-populate-dropdowns.html?lang=en 

[1] - https://docs.mktossl.com/docs/experience-manager-learn/forms/prefill-fdm-db/configuring-form-data-model.html?lang=en

[2] - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/prefill-fdm-db/introduction.html?lang=en 

2 replies

Pulkit_Jain_
Adobe Employee
Pulkit_Jain_Adobe EmployeeAccepted solution
Adobe Employee
September 10, 2022

@luanh2511 

Suppose the list of address fields against zip codes is limited. In that case, you can write a servlet to list the addresses against codes as elaborated here[0] (a similar use case) and then make an AJAX call from the form to the servlet

OR,

if the data might change frequently, you can use FDM[1][2] to prefill data based on an input field.

Also, this can be done using an external API anyways.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-64/forms/customize-aem-forms/dynamically-populate-dropdowns.html?lang=en 

[1] - https://docs.mktossl.com/docs/experience-manager-learn/forms/prefill-fdm-db/configuring-form-data-model.html?lang=en

[2] - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/prefill-fdm-db/introduction.html?lang=en 

Mayank_Gandhi
Adobe Employee
Adobe Employee
September 15, 2022

@luanh2511 It's a standard use case, if you have used FDM you can call FDM to pull data on zip and show it in the respective field.