phpnoob11 Posted July 3, 2013 Share Posted July 3, 2013 Hello, im using punbb and want to make a about me profile section, so far i have corrected the database column legth so it can fit in more that just one line (i have edited a existing field yahoo and renamed it so it now says bio next to it...) however if i edit the max lenght so users can see the bio better because its a input box it just one really long line box, but what i want is a text area? Can some one please help me... i have tried just changing the input id= to text area equlas however it doesnt save the input and doesnt do anything... <div class="sf-box text"> <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Yahoo'] ?></span></label><br /> <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[yahoo]" value="<?php echo(isset($form['yahoo']) ? forum_htmlencode($form['yahoo']) : forum_htmlencode($user['yahoo'])) ?>" size="200" maxlength="450" /></span> </div> is what im trying to change this is what i am trying to change it too <div class="sf-box text"> <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Yahoo'] ?></span></label><br /> <span class="fld-input"><TEXTAREA NAME="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[yahoo]" value="<?php echo(isset($form['yahoo']) ? forum_htmlencode($form['yahoo']) : forum_htmlencode($user['yahoo'])) ?>" ROWS=3 COLS=30 > </TEXTAREA></span> i tried that the above but that didn't do anything... showed the textarea but it would not save anything... any help please? Thank you i can post the whole profile.php if it helps? I have tried asking on the punbb forums however i think punbb is dead and nobody answer questions anymore... Thank you guys. Link to comment https://forums.phpfreaks.com/topic/279826-how-can-i-make-this-a-text-area-instead-of-a-input-box/ Share on other sites More sharing options...
cyberRobot Posted July 3, 2013 Share Posted July 3, 2013 The value goes between the open and close textarea tags. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea Link to comment https://forums.phpfreaks.com/topic/279826-how-can-i-make-this-a-text-area-instead-of-a-input-box/#findComment-1439240 Share on other sites More sharing options...
phpnoob11 Posted July 3, 2013 Author Share Posted July 3, 2013 thanks for your reply when i try <textarea name=""ld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[yahoo]" value="<?php echo(isset($form['yahoo']) ? forum_htmlencode($form['yahoo']) : forum_htmlencode($user['yahoo'])) ?>" </textarea> it will show the textarea box but it will be filled with loads of random html and the submit box seems to disappear.... so i think the rest of the goes in the textarea instead... Is that what you mean with putting it the values inside? Link to comment https://forums.phpfreaks.com/topic/279826-how-can-i-make-this-a-text-area-instead-of-a-input-box/#findComment-1439245 Share on other sites More sharing options...
phpnoob11 Posted July 3, 2013 Author Share Posted July 3, 2013 Is there a way i can make a textarea that the input box can echo and send to the database? And is there a way to make text area display the input value if there is anything? Link to comment https://forums.phpfreaks.com/topic/279826-how-can-i-make-this-a-text-area-instead-of-a-input-box/#findComment-1439258 Share on other sites More sharing options...
cyberRobot Posted July 5, 2013 Share Posted July 5, 2013 The value needs to go between the open and close tag: <textarea name="myTextArea" cols="30" rows="10">My Value</textarea> Note: I would highly recommend reviewing the textarea link provided earlier (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea). There are quite a few errors in your textarea code. To help fix the errors, you should run the form through the W3C validator: http://validator.w3.org/ Link to comment https://forums.phpfreaks.com/topic/279826-how-can-i-make-this-a-text-area-instead-of-a-input-box/#findComment-1439520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.