Hi!
I seem to have a problem implementing 2 forms on one page (2 components which
have a form in the view).
Form 1 (simple form with button for logout in main menu area):
[code]
<form method="POST" style="display:inline;" action="?">
<blossom:pecid-input />
<input type="hidden" name="logout"
value="true"/>
<button type="submit" class="btn
pull-right">Sign out</button>
</form>
[/code]
Form 2 (some simple form in content area):
[code]
<form:form method="POST" cssClass="form-horizontal" role="form"
accept-charset="utf-8" modelAttribute="simpleSmsForm" action="?">
<blossom:pecid-input />
<div class="row inputset">
<form:label path="sender"
cssClass="control-label">Sender:</form:label>
<form:input path="sender"
cssClass="form-control"/>
<form:errors path="sender"
cssClass="text-danger"/>
</div>
<div class="row inputset">
<form:label path="destination"
cssClass="control-label">Destination:</form:label>
<form:input path="destination"
cssClass="form-control"/>
<form:errors path="destination"
cssClass="text-danger"/>
</div>
<div class="row inputset">
<form:label path="message"
cssClass="control-label">Message:</form:label>
<form:textarea path="message"
cssClass="form-control"/>
</div>
<form:errors path="message" cssClass="text-danger"/>
<div class="row inputset">
<button class="btn btn-default pull-right"
type="submit">Send</button>
<button class="btn btn-primary pull-right"
type="reset">Reset</button>
</div>
</form:form>
[/code]
Now, when I click the Form2 submit button it goes to the appropriate
controller->method, but after the return the Form1 method is also executed.
If I click on the Form1 submit button everything works as expected but I
suppose that's because the controller->method does a redirect so it prevents
further execution.
Is there something obvious I'm missing?
Any help would be appreciated,
Thnx in advance!
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=41c73e9d-3543-4218-893e-b79d0933212f
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------