phphtmlformstwitter-bootstrapsubmit

Bootstrap form won't submit with image button


I have made a form with Bootstrap. There is a image button to submit the form but when I click it, nothing happens.

<form name="input" action="index.php" method="post" class="form-horizontal">                    
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input name="coins" type="text" class="form-control" placeholder="Quanity" >
    </div><br>
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input type="text" class="form-control" name="usd" placeholder="USD" >
    </div><br>
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input  type="text" class="form-control" name="paypal" placeholder="PayPal Address" >
    </div><br>
    <div class="input-group">
        <input type="image" src="/img/ppbutton.png" name="submit" alt="PayPal - The safer, easier way to pay online!">
    </div><br>
</form> 

Solution

  • Try adding this.form.submit like below:

    <input type="image" onclick="this.form.submit()" src="/img/ppbutton.png" name="submit" alt="PayPal - The safer, easier way to pay online!">