Frequently Asked Questions: script questions: nl phpmail: page: 2
-
1
How can I make a textarea field on my form?
Use a code like this:
<textarea name="comments" rows="5" cols="40"></textarea>
All you have to do is change the name (in this case comments) so you know what this answer is about! You can, of course, change the rows number to reflect the height of your box, and the cols number to reflect the width of the box.
Please note: These tags don’t limit the length of a line someone can enter, or how many lines of text they can enter. They simply describe the appearance of the form.
If you want to supply some default text for the text area, you should place it before the </textarea> tag, like so:
<textarea name="comments" rows="5" cols="40">Text</textarea>
May 21, 2004 |
By Louise |
Filed under FAQ, NL-PHPMail, PHP, Scripts
-
2
How can I use a dropdown menu?
Here’s an example:
<p>What's your favorite color?<br /> <select name="color"> <option selected="selected">Please choose...</option> <option value="blue">blue</option> <option value="red">red</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="green">green</option> <option value="purple">purple</option> <option value="black">black</option> <option value="white">white</option> </select></p>
The name in the select tag is the name of the field, the value is what will get sent to you in the e-mail, the text in between the two option tags is what your visitors will see.
To make a certain option selected by default, add ’selected="selected"’ to the input tag, as shown above.
May 21, 2004 |
By Louise |
Filed under FAQ, NL-PHPMail, Scripts