Dimwhit Posted February 10, 2007 Share Posted February 10, 2007 I've been looking all over for this, so I thought I'd register here and give it a shot. I've set up some pages that allow me to post what amount to articles through a backend form. In this form, I'm directly pasting the article contents, along with the html code that goes with it. It displays just fine, but when I go back to edit it, when the contents of that field are displayed in the textarea, the top part of it is lost. It varies...sometimes just the opening <p> tag, other times a whole paragraph up to and including the next <p> tag. So it looks like when the field contents are being brought into the form textarea, everything up to and including the first paragraph tag is stripped. And at the same time, that paragraph tag (with the style info) is read by my browser so that all the text in the field displays with whatever style was attached to that tag. Does that make any sense? How can I force ALL the field content to appear for edit, including the opening html tags? Thanks! Looks like there's a lot of info floating around here. I'll be diving in soon, I think. Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted February 10, 2007 Share Posted February 10, 2007 I'm not sure I understand, maybe show some code? Quote Link to comment Share on other sites More sharing options...
Dimwhit Posted February 10, 2007 Author Share Posted February 10, 2007 I'm not sure there's much to show. I used a standard form to input a body of text into the field $body. In order to edit that content, I have a script that will update the $body field with the new info I use the following: <textarea name="ud_body" cols="80" rows="80" id="body" value="<? echo $body; ?>"> In the update form. It retrieves all content from $body, I edit it, then the script I use takes the new content, now from ud_body, and inserts it back in the $body field. The problem is that when the content date as retrieved using the value="<? echo $body; ?>" call in the form, some of the content (the html tags) is being stripped out of it. For example, the first line of text that I inserted into $body the first time was: <p align="left" class="standardtextitalics">We have learned an important principle since the inception...</p> However, what shows up when I go to edit it is: We have learned an important principle since the inception...</p> Does that make any more sense? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 10, 2007 Share Posted February 10, 2007 Textarea doesn't use value="", you put the content between the two textarea tags. Quote Link to comment Share on other sites More sharing options...
Dimwhit Posted February 11, 2007 Author Share Posted February 11, 2007 I'm an idiot. It's always something stupid with me. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.