#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    7
    Rep Power
    0

    Form submit button not working


    hi can someone help with this problem.

    my submit button will not do anything

    my code for the form is:

    Code:
    <div id="contact_form"
    	<form name="contact" action="send_mail.php" method="post">
    		Name: <input style="width:180px;"type="text" name="name"></input><br><br>
    		Telephone: <input style="width:180px;"type="text" name="telephone"></input><br><br>
    		E-mail: <input style="width:180px;"type="text" name="email_address"></input><br><br>
    		<label style="vertical-align: top;">Message:</label>
    		<textarea style="width:179px" type="text" name="message" rows="8"></textarea><br><br>
    		<input id="submit" type="submit" value="Send Message"></input>
    	</form>
    </div>
    i tested the form code in a seperate page to the one i want it in and it does work, could it be my css or sumthing like that stopping it?

    Thanks in advance
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2010
    Posts
    17
    Rep Power
    0
    There were a few issues. One tags like <input> are self closing. Meaning they don't need a closing tag like </input>. You just close it with a "/". Same thing with your <br /> tags you needed the "/".

    Heres what your code should look like. I haven't tested it but it should work.

    Code:
    <div id="contact_form">
     <form name="contact" action="send_mail.php" method="post">
      Name: <input style="width:180px;"type="text" name="name" />
      <br />
      <br /> 
      Telephone: <input style="width:180px;"type="text" name="telephone" />
      <br />
      <br /> 
      E-mail: <input style="width:180px;"type="text" name="email_address" />
      <br />
      <br /> 
      <label style="vertical-align: top;">Message:</label>
      <textarea style="width:179px" type="text" name="message" rows="8"></textarea>
      <br />
      <br /> 
      <input id="submit" type="submit" value="Send Message" />
     </form> 
    </div>
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    7
    Rep Power
    0
    Thanks that did work, cant believe it was something so simple
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0
    <input id="submit" type="submit" value="Send Message"></input>

    should write like this

    <input id="submit" type="submit" value="Send Message" />
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0
    Originally Posted by Orfantal
    hi can someone help with this problem.

    my submit button will not do anything

    my code for the form is:

    Code:
    <div id="contact_form"
    	<form name="contact" action="send_mail.php" method="post">
    		Name: <input style="width:180px;"type="text" name="name"></input><br><br>
    		Telephone: <input style="width:180px;"type="text" name="telephone"></input><br><br>
    		E-mail: <input style="width:180px;"type="text" name="email_address"></input><br><br>
    		<label style="vertical-align: top;">Message:</label>
    		<textarea style="width:179px" type="text" name="message" rows="8"></textarea><br><br>
    		<input id="submit" type="submit" value="Send Message"></input>
    	</form>
    </div>
    i tested the form code in a seperate page to the one i want it in and it does work, could it be my css or sumthing like that stopping it?

    Thanks in advance

    Hi, I see you are missing the closing ">" in the <div> tag.
    <div id="contact_form" .... use <div id="contact_form">
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2016
    Posts
    1
    Rep Power
    0
    Hi someone help with this problem
    my submit button will do anything

    I already follow form code in seperate page to the one,and nothing happend.
    Code:
     <form method="post" id="form" class="form" role="form" action="join_proses.php">
               <div class="alert alert-danger" id="hasil" role="alert" style="display:none"></div>
            <label>Nomer Anggota:</label>
            <input type="text" name="no" id="no" value="<?php echo $idbaru;?>" readonly="" />
                 <label>Nama:</label>
            <input type="text" id="nama" name="nama" placeholder="Nama">
               <label>Tanggal Lahir:</label>
            <input type="date" id="tgl_lahir" name="tgl_lahir" id="tgl_lahir">
            <label>Alamat :</label>
               <textarea class="" id="alamat" name="alamat" rows="3"></textarea>
               <label>No Telepon:</label>
    		   <input type="text" id="tlp" name="tlp" placeholder="No Telpon"></br></br>
               <label>Jenis Kelamin:</label>
               <input type="radio" name="gender" value="Pria"/>Pria</br>
               <input type="radio" name="gender" value="Wanita"/>Wanita</br></br>
            <label>Username: </label>
                <input type="text" class="form-control" placeholder="UserName *" id="user" name="user">
            <label>Email: </label>
                <input type="text" class="form-control" placeholder="Email *" id="email" name="email">
            <label>Password: </label>
                <input type="password" class="form-control" placeholder="Password *" id="password" name="pswd">
            <br>
            <br>
             <input id="submit" type="submit" name="submit" class="btn btn-success" value="kirim"/>
                    <a href="index.php"class="btn btn-warning">close</a>
            <br>
            <br>
            </form>
        </div>

IMN logo majestic logo threadwatch logo seochat tools logo