This forum is now read-only. Please use our new forums at discuss.codecademy.com.

About You Forum

View Course » View Exercise

453 points
575b7a525917ec08f000059b_685520714
Submitted by
Booligoosh
about 2 years ago

How do you use inputs?

I know what inputs are, but have a few questions as to the use of them:

  1. How do I make the submit button work?
  2. How do I incorporate the answer into my website?

Is there a course which explains this?
If not, could someone please tell me.


1 vote

permalink

Hi Booligoosh,

To make your submit button work, just add a action and method attribute to a <form> element around the <input>. For example, assuming that a POST request to /contact will send the code, you could have a form that looks like this:

<form method="post" action="/contact">
  <input type="email" name="email" required>
</form>

How do I incorporate the answer into my website?

What languages is your site built on? That makes a big difference in how you put a form on your site :)

2818 points
5674c6dae39efec455000434_879409444
Submitted by
Zeke Y
about 2 years ago

2 Comments

575b7a525917ec08f000059b_685520714 Booligoosh about 2 years ago

Thank you, that really helps!!!
As for incorporating it into the website, let's say I just want it to have their name they put in in the corner of the screen, is there any way I could do that just with HTML so it looks something like this:
(input_answer)
or something similar.

5674c6dae39efec455000434_879409444 Zeke Y about 2 years ago

I'm having trouble visualizing what you're saying. Do you have the website (at least partially) built? Could you put the code on GitHub so I can see it?