Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form, textarea, input problem

    Here is the rough draft which works with my PHP and validation fine"

    Code:
    <form method="POST" action="contact.php">
    
    <table border="4" cellpadding="2" cellspacing="2">
    	<tr>
        	<td colspan="2" align="center">
    			Fields marked (*) are required
           	</td>
        <tr>
        
        <tr>
        	<td width="30%">
            	Member Name:
           	</td>
    		<td width="70%">
            	<input type="text" name="Name">
           	</td>
        </tr>
        
        <tr>
        	<td>
            	Email Address:*
         	</td>
            <td>
            	<input type="text" name="EmailFrom">
           	</td>
        </tr>
    
        <tr>
        	<td>
            	Member Number:
          	</td>
            <td>
            	<input type="text" name="MemberNumber">
           	</td>
        </tr>
        
        <tr>
        	<td>
            	Number in Party:
           	</td>
            <td>
            	<input type="text" name="NumberinParty">
           	</td>
        </tr>
        
        <tr>
        	<td>
            	Comments or questions:
           	</td>
            <td>
            	<input type="text" name="Comments">
           	</td>
        </tr>
        
        <tr>
        	<td colspan="2" align="center">
            	<input type="submit" name="submit" value="Submit">
           	</td>
        </tr>
    
    </table>
    
    </form>
    but if you change
    Code:
    <input type="text" name="Comments">
    to
    Code:
    <textarea name="Comments">
    the whole form and table falls apart... but i need a textarea for comments

    i had zero problems with my php or javascript but this is holding me up and i am too tired and sleep deprived to fix it at this point.

    please advise.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    textarea require rows and cols attributes. Check if this is the problem.

    Code:
    <textarea name="mytxt" rows="8" cols="82"></textarea>
    best regards

  • #3
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For some reason when I change it from "input" to "textarea" the rest of the form just falls apart, cells dissapear. Even dreamweavers color coding of different things allk goes to black. Usually form elements are in orange in DW and after the change of tags its all just black and nothing works. my submit button even dissipates.

    its really weird. any help would be awesome. did i leave out a tag or add an extra one? i dont see it but im sure thats the culprit because even using the DW shortcuts to add the textarea tag causes the same problem.

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by ohg123 View Post
    For some reason when I change it from "input" to "textarea" the rest of the form just falls apart, cells dissapear. Even dreamweavers color coding of different things allk goes to black. Usually form elements are in orange in DW and after the change of tags its all just black and nothing works. my submit button even dissipates.

    its really weird. any help would be awesome. did i leave out a tag or add an extra one? i dont see it but im sure thats the culprit because even using the DW shortcuts to add the textarea tag causes the same problem.
    first step to solve something is to identify the problem and your problem have nothing to do with html.

    Edit: sorry but I don't use dreamweaver and I can't help you


    best regards

  • #5
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    SOLVED!

    Well it wasnt a dreamweaver issue. It appears that 'textarea' requires a closing tag even though 'input' does not.

    i had this
    Code:
    <td><textarea name="com"></td>
    but that didnt work. it needs to be one of these to work and not destroy the form.
    <td><textarea name="com"></textarea></td>
    or

    <td><textarea name="com" /></td>
    thanks guys, this forum is awesome


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •