Textarea value not getting posted with form

Solution 1:

try to put it inside the form tag as follows... it should work

<form action="sendConfirmation.php" name="confirmationForm" method="post">
    <textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText"></textarea>

   <input type="submit" value="Email" class="submitButton">
</form>

however you can use the same approach as well but you need to provide the from id attribute then

<form action="sendConfirmation.php" id="confirmationForm" method="post">
   <input type="submit" value="Email" class="submitButton">
</form>

Solution 2:

You must put in the form attribute of the textarea the form's id, not it's name.

try:

<textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText" form="confirmationForm"></textarea>

<form action="sendConfirmation.php" id="confirmationForm" name="confirmationForm" method="post">
   <input type="submit" value="Email" class="submitButton">
</form>

source: http://www.w3schools.com/tags/att_textarea_form.asp

Solution 3:

Make sure you are not missing out on name attribute of textarea tag. This happend to me in django.

Solution 4:

Just Add Form="formId" attribute to TextArea tag and Assign Id to Form

<textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText" form="confirmationForm"></textarea>

<form action="sendConfirmation.php" id="confirmationForm" name="confirmationForm" method="post">
   <input type="submit" value="Email" class="submitButton">
</form>

Solution 5:

You need to put your textarea inside the form tag

 <form action="sendConfirmation.php" name="confirmationForm" method="post">
    <textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText" form="confirmationForm"></textarea>
    <input type="submit" value="Email" class="submitButton">
</form>

When a form is submitted everything inside it is sent, any inputs outside the form tag are ignored.