I have two submit buttons part of two different forms. They are being displayed on two different lines. Is it possible to have them, side by side on a single line.
<form action="" method="POST">
<input type="submit" name = "" value="OK" >
</form>
<form action="" method="POST">
<input type="submit" name = "" value="Cancel" >
</form>
If you have multiple buttons that should sit side-by-side on the same line, add the data-inline="true" attribute to each button. This will style the buttons to be the width of their content and float the buttons so they sit on the same line.
yes, multiple submit buttons can include in the html form. One simple example is given below.
Having multiple submit buttons and handling them through PHP is just a matter of checking the the name of the button with the corresponding value of the button using conditional statements. In this article I'll use both elseif ladder and switch case statement in PHP to handle multiple submit buttons in a form.
The other way is to change the css properties for the form tags:
form { display: inline; }
Example: http://jsbin.com/omene3/2/edit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With