I have a Joomla module in an article. The module has a form, and when I submit the form I want it to reload the same page (and some PHP will take care of the form's new state).
Is there any way to do this with a module, without using ajax? Because at the moment Joomla throws a 404 and I can't figure out where the form is trying to submit to.
Let's say my page is http://www.example.com/payment
The form submits to http://www.example.com/404
This is my form:
<form method="post">
<label>Order ID</label>
<input type="text" name="id" value="<?php echo $_POST['id']; ?>" />
<label>Email</label>
<input type="text" name="email" value="<?php echo $_POST['email']; ?>" />
<input type="submit" name="login" value="Continue" />
</form>
I have tried having no form action, as well as:
action="index.php?option=com_content&view=article&id=8"
action="/index.php?option=com_content&view=article&id=8"
action="payment"
action="/payment"
It always submits to 404.