Jump to content

Need Some Help With a Form


inSaneELF

Recommended Posts

Okay, I don't really know PHP, so I'm having some trouble with something. I'm trying to modify this form:

[img]http://img247.imageshack.us/img247/8489/formok7.gif[/img]

I want to add a name for the text area that is right above the Submit button like Name, Street, City, State, etc. Here is the code for the text area (called "message"):

[code] // message
if ( !empty( $dfcontact["field"]["message"]["display"] ) ) {
echo "<tr>\n";
echo "<td colspan=\"2\" valign=\"top\"><textarea name=\"message\" class=\"inputbox\" cols=\"40\" rows=\"5\">" . ( !empty(

$_REQUEST["message"] ) ? htmlentities( stripslashes( $_REQUEST["message"] ) ) : "" ) . "</textarea>" . ( !empty(

$dfcontact["field"]["message"]["duty"] ) ? "*" : "") . "</td>\n";
echo "</tr>\n";
}[/code]

Where and how do I add the name?

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/29344-need-some-help-with-a-form/
Share on other sites

Something like this should do it:
[code]
// message
if ( !empty( $dfcontact["field"]["message"]["display"] ) ) {
echo "<tr>\n";
echo "<td colspan=\"2\" valign=\"top\"><span>Message:</span><br /><textarea name=\"message\" class=\"inputbox\" cols=\"40\" rows=\"5\">" . ( !empty(

$_REQUEST["message"] ) ? htmlentities( stripslashes( $_REQUEST["message"] ) ) : "" ) . "</textarea>" . ( !empty(

$dfcontact["field"]["message"]["duty"] ) ? "*" : "") . "</td>\n";
echo "</tr>\n";
}
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.