Hi Guys,
I have a form with two buttons.. I want to use one to submit the form and the other for another purpose. But right now both buttons are submitting the form...
Here is my code for a better picture.
This is the button that i am planning to stop submitting the form with.
Not directly related but you can also manage two submit buttons by using different name attributes on them. Then you can pick them up in PHP
if (Input::has('submit1'))
{
// This was used - <button type="submit" name="submit1">Submit1</button>
}
if (Input::has('submit2'))
{
// This was used - <button type="submit" name="submit2">Submit2</button>
}
Just on a side note here as well. I faced the same issue on an input where I was using vuejs. Turns out in vue it is so simple it hurts... have a look: