I\'m trying to input a textarea tag when I submit my form:
I had disabled="disabled"
attribute in my textarea
. It will prevent submitting input
as well.
It will work.
<textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText" form="confirmationForm"></textarea>
<form action="sendConfirmation.php" id="confirmationForm" method="post">
<input type="submit" value="Email" class="submitButton">
</form>
Just change or add the form attribute in the textarea tag with value of the id of the form tag.
Make sure you are not missing out on name attribute of textarea tag. This happend to me in django.
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>
Try to put it beside 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" form="confirmationForm"></textarea>
<input type="submit" value="Email" class="submitButton">
</form>
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.