I am following this tutorial:
Is there any way to get the data using normal input boxes from a page designed on static template and submit it into the jsp file POST.post.jsp. Here is the design and code of my page designed using static templates.
<H1>Enter employee details</h1>
<form action="/apps/eysample/components/structure/contentpage/processform.jsp">
First name:<br>
<input type="text" name="firstname">
<br>
Position:<br>
<input type="text" name="position"><br>
Office:<br>
<input type="text" name="office">
<br>
Age:<br>
<input type="text" name="age">
<br>
Date:<br>
<input type="text" name="date">
<br>
Salary:<br>
<input type="text" name="sal">
<button type="submit">Submit</button>
</form>
I tried creating a copy of post.POST.jsp and referred it as shown in the code. Can anyone please help me out because my method is not working,
Solved! Go to Solution.
Views
Replies
Total Likes
use POST.jsp with this -
<form action="${resource.path}" enctype="multipart/form-data" name="subscribeForm" id="subscribeForm" method="POST" onsubmit="return validate(this, rules);">
// form fields
</form>
Alternatively:
<script>
$(document).ready(function() {
$( "form" ).submit(function( event ) {
// do something
}
});
</script>
Views
Replies
Total Likes
Use <form method="POST" action="<somepattern>.post.<someextension> >......... </form> in your jsp/htl script and when you post your form it will submit to POST.jsp.
Alternatively, you could use jquery/js to submit the form.
Views
Replies
Total Likes
Can you provide me an example fragment please.
Views
Replies
Total Likes
For HTML Form elements - as opposed to AEM Form components -- see this as an example. Its an older article - but you will get the point.
Scott's Digital Community: Submitting Adobe Experience Manager form data to custom Sling Servlets
Views
Replies
Total Likes
use POST.jsp with this -
<form action="${resource.path}" enctype="multipart/form-data" name="subscribeForm" id="subscribeForm" method="POST" onsubmit="return validate(this, rules);">
// form fields
</form>
Alternatively:
<script>
$(document).ready(function() {
$( "form" ).submit(function( event ) {
// do something
}
});
</script>
Views
Replies
Total Likes
Views
Likes
Replies