inSaneELF Posted December 3, 2006 Share Posted December 3, 2006 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 More sharing options...
papaface Posted December 3, 2006 Share Posted December 3, 2006 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] Link to comment https://forums.phpfreaks.com/topic/29344-need-some-help-with-a-form/#findComment-134559 Share on other sites More sharing options...
inSaneELF Posted December 4, 2006 Author Share Posted December 4, 2006 Worked beautifully! Thank you. Link to comment https://forums.phpfreaks.com/topic/29344-need-some-help-with-a-form/#findComment-134570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.