#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    774
    Rep Power
    43

    HTML form submit button


    OK, Can't believe I'm having trouble with this, but let's see.

    I have a simple form, but the submit/login button does not work. It was working, then suddenly, not.

    Here's the basic code
    Code:
    <form class="forms contact-form" name="form1" action="login.php" method="post">
    								
    								<div class="row">
    									<div class="col-sm-6 name-field">
    										<input type="text" name="email" class="defaultText required username" title="Email (Required)"/>
    									</div><!-- /.col -->
    								</div><!-- /.row -->
                                    
                                    <div class="row">
    									<div class="col-sm-6 name-field">
    										<input type="text" name="psswd" class="defaultText password" title="Password"/>
    									</div><!-- /.col -->
    								</div><!-- /.row -->
    								
    								
    								<button type="button" class="btn btn-default btn-submit" name="form1" value="submit">Login</button>
    								
    							</form>


    I did try a few variations, but not sure what's happening.

    thanks
  2. #2
  3. Headless Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,977
    Rep Power
    9647
    A <button> with type=button will just behave like a plain button. It will not submit the form.
    If you want the button to submit the form then it needs type=submit.

IMN logo majestic logo threadwatch logo seochat tools logo