How to change the "action" attribute of <form> tag in a page that uses the default Form Template? | Community
Skip to main content
Level 2
October 16, 2015
Solved

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

  • October 16, 2015
  • 2 replies
  • 725 views

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]

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 smacdonald2008

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

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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

Level 2
October 16, 2015

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-manager.topic.2_ciot.html/forum__4gj6-i_want_to_senddata.html