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

How to change the "action" attribute of <form> tag in a page that uses the default Form Template?

Avatar

Level 2

I have created a page and selected the default Form Template.

In the form component I dragged two fields username and Password and Submit button too.
When I see page source <form action="abc.html"> the action points to itself, I am not getting away to configure this "action" attribute. I want the to do is, send the data  to my own Custom Servlet or too a JSP component that I have created. 
how do I do this ... please help !!

I have uploaded the snip.. when I view source the action always points to itself... I want to to change it and make it point to my Custom Servlet!!! 

[img]Capture.PNG[/img]

[img]2.PNG[/img]

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can extend the form component or create your own form component. Once you either build your own or extend the existing one  - you can use JavaScript and AJAX to send data to an AEM Sling Servlet. To give you an idea of how to use AJAX to send form data to a sling servlet -- see: 

http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

Hope this helps

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

You can extend the form component or create your own form component. Once you either build your own or extend the existing one  - you can use JavaScript and AJAX to send data to an AEM Sling Servlet. To give you an idea of how to use AJAX to send form data to a sling servlet -- see: 

http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

Hope this helps

Avatar

Level 2

I created a Custom Form Action and submitted data to a SlingServlet. It works fine now!!!

Can you help me solve another one of my problems?

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...