Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM Form with React

Avatar

Level 3

Hello Everyone,

I am having a AEM React SPA. I want to make a user review module. I have design everything need in React. Now I am confused about how I can store data in AEM. So when users come to the page they can see the review that the user has made and Author can review that like approve or disapprove. Please suggest me! How can I do that? 

 

* Note: Can't use ADOBE Forms Addon. As I don't have permission to install any addons and my Admin Team will not allow me to install it.

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

Just like any other content creation api. Dedicate a node for all form responses. Now setup a servlet with postmethod which can be set as form action for react form and upon submission let the servlet create a new node with nt unstructured type for every form submission with all data and assign each request parameter as a prop to this node and probably an additional property to store form submission request id so every node is unique. I don't have any sample code I can share but this is perfectly doable. Also make sure you have a captcha in your form so users don't break your publisher by submitting massive post requests causing too many nodes created. As that is out of the scope of this requirement let's not go deep into that topic. Thanks 

View solution in original post

8 Replies

Avatar

Level 9

Hello,

 

I am not sure which version or program you are using in AEM but as per my suggestion not using AEM for UGC (user generated content like review, feedback etc...) rather using some other integration like AEM community/anything similar.

 

You can refer below

https://experienceleague.adobe.com/docs/experience-manager-65/communities/develop/srp-and-ugc.html?l...

https://business.adobe.com/products/experience-manager/sites/user-generated-content.html

Avatar

Level 5

Without integration of a third party product or Adobe Community or not using UGC, will make it hard to achieve this. In one of my prev project, there were AEM forms that store data inside AEM. There is a dedicated node structure where all user  responses are captured, and then there is a reverse replication agent that replicates all user responses back to author for reporting purpose, but in your case, again approve or reject kind of workflow makes it more complicated. Usually in enterprise there will be other products that you integrate to validate this kind of workflow. And in the approach I mentioned, you still need to have Java knowledge and Replication Agents setup, can not be achieved using just React. Thanks

Avatar

Level 3

Thank you for your kind response. I am looking same node structure solution. Do you have any link for the node structure data storing system? Is the same thing achievable with Storage API?

Avatar

Correct answer by
Level 5

Just like any other content creation api. Dedicate a node for all form responses. Now setup a servlet with postmethod which can be set as form action for react form and upon submission let the servlet create a new node with nt unstructured type for every form submission with all data and assign each request parameter as a prop to this node and probably an additional property to store form submission request id so every node is unique. I don't have any sample code I can share but this is perfectly doable. Also make sure you have a captcha in your form so users don't break your publisher by submitting massive post requests causing too many nodes created. As that is out of the scope of this requirement let's not go deep into that topic. Thanks 

Avatar

Community Advisor

Hello @ashikg3 ,

The biggest challenge when deciding a solution for that kind of a requirement is to be consistent and real time.

 

  1. If the requirement does NOT need to be real time, I would suggest go for (Adobe or any other) Analytics integration. There are very high chances are that every customer has some kind of Analytics solution.
  2. If the requirement is TO BE real time, then the implementation a RDBMS database like oracle, PostgresSQL, etc. outside of AEM to store reviews/ratings would a simple and reliant ways.

 

I've had experience with UGC for Adobe AEM Communities module. There are at least 2 problems that I see,

1. Communities module is not supported any longer by Adobe.

2. The out of sync issues among multiple publishers from time to time (assuming its an AEM on premises deployment).

 

 

thanks,

Preetpal

Avatar

Level 3

Thank you for your reply. But I am not allow to use any kind of database solution.