I have a form in my CakePHP with two submit buttons like so:
<div class="form-actions">
<button type="submit" name="preview" class="btn btn-large">Preview</button>
<button type="submit" name="save" class="btn btn-large">Save</button>
</div>
However because I've given them both names it returns with an error that the request has been black-holed due to the security restrictions.
How do I get around this? As I want to do different things in the controller dependant on which button was used to submit the form.
js, is that an option? - Ofir Baruch