I would like to know how to hold text area or select dropdown value in edit section of the form page. Right now if I put text in textarea box and select a particular value from a dropdown list, those value saved really well in the form. But when I tried to edit that form, those selected textarea and dropdown value is gone. But in input textbox, that value always holds even after form edit. But in textarea or select dropdown, all values are gone when you tried to edit the form. I need this work on my joomla php file.

I have tried many methods from stackoverflow like the following:

<textarea name="post_text" cols="50" rows="5"><?php echo htmlspecialchars($_POST['post_text']);?></textarea>


<textarea name="post_text" cols="50" rows="5"><?php echo $_POST['textareaContent']; ?></textarea>

But nothing is working. So need your help on this.

  • You're trying to echo the $_POST variable which is used on a form submission. You'll need to get the data from the database
    – Lodder
    Commented Feb 6, 2016 at 22:32

1 Answer 1


If you are going from a display view to an edit view you need to query the data from your database based on the unique id of the data you are attempting to edit.

If you are posting the form back to itself try using the JInput class to get the posted data and repopulate the form

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.