Text Area Form attribute help

This code that I’m trying to see how it works, I pasted onto an html page. It supposedly allows me to enter text into a form, and then submit, and the submitted text is supposed to appear in the other box on the page. I believe I don’t have the form action path correct. Should it be something like https://web-page.com/textareapage..html and somehow referencing a path to the iframe?
I look forward to any comments/suggestions, thanks…

<textarea name="comments" id="comments" minlength="20" maxlength="120" form="myForm">
Hey... say something!
</textarea><br>
<form action="html/" target="processForm2" method="post" id="myForm">
<input type="submit" value="Submit">
</form>
<iframe name="processForm2" width="100%" height="50%"></iframe>

A form submits data to a page on the server. But to do anything with that data (such as display it on a page) the page that it is sent to needs to process it with a backend language such as PHP. Your code will submit the data but nothing is being done with it.

action="page.php" in the form tag should describe the path to the page to which the data is being sent, the page that will include backend code to process the data.

Thanks for your reply.
It didn’t seem to appear that way on this page (under 'the form Attribute)

That page is very misleading - it doesn’t mention that you need server side processing of a form and does imply that you only need the HTML. But that is not the case. As you have found out - just using the HTML will not do anything with the data.

Are you opening the page you have created in a server (either your own or an online one) or just opening the page on your computer?

This link better explains how forms work: https://www.w3schools.com/html/html_forms.asp

I hope someone else chips in soon to confirm that I’m not missing the point here.

Thanks, I’ve got it… I appreciate the help

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.