Hi everyone,
I have a use case where the end user needs to provide feedback on the content they are viewing on a web page. The web page consists of 10 different sections (e.g. Section-A, Section-B, etc.). To allow the end user to provide feedback on a specific section, I need to implement a pop-up feedback form that will be available when the "Contact Us" link is clicked.
The feedback form will have a dropdown list that enables the end user to select the section they wish to provide feedback on, as well as a description field where they can enter their feedback or suggestions. Once the end user submits the feedback form, the data will be stored in a separate database for reporting purposes.
I'm seeking the community's input on the best way to implement this feature. Please let me know if you have any suggestions or recommendations.
Environment - AEM Cloud Services
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
1) & 4) you can use data source to create the drop-down dynamically by pulling the title of each section. You can also create the drop down list using cad common. http://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html?m=1
2) Make a POST call to a servlet. This servlet stores the data in the database. Make sure aem is able to connect to your database.
3) There should not be any security concern as it will contain generic information. Make sure to do validation on feedback form to validate the data that user submitted.
1) & 4) you can use data source to create the drop-down dynamically by pulling the title of each section. You can also create the drop down list using cad common. http://aemlab.blogspot.com/2022/01/aemaacs-touch-ui-dialog-dynamic-dropdown.html?m=1
2) Make a POST call to a servlet. This servlet stores the data in the database. Make sure aem is able to connect to your database.
3) There should not be any security concern as it will contain generic information. Make sure to do validation on feedback form to validate the data that user submitted.
Hi,
If there are already sections available on the page, you can utilize JavaScript to create a list of sections using the DOM object. Alternatively, you can obtain the list of sections in the form of a JSON object and create a list.
You can create a servlet or use a separate Service layer to push the data in external database and invoke the service using an AJAX call to submit the form data.
To ensure that only valid data is processed, implement server-side validation of the form data.
To prevent malicious code execution, utilize encoding and sanitization techniques such as HTML entity encoding, JavaScript encoding, and HTML sanitization.