What is . in <form action="." method="post">?

Asked

Viewed 21,967 times

5

I’m starting in Django and making some changes in code already written by someone. I realized that in form instead of the usual "/action page" to which the data will be submitted, such as in this example of W3schools:

<form action="/action_page.php" method="get">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit" value="Submit">
</form>

the attribute action has a point, why?

<form action="." method="post"> 

1 answer

7


This is only related to HTML. The client has to send the form data to some page, and there on action you say which, so far you already know. If you want to send to the page itself where is the form you would do how? You can put the full address of the page. Or you can just put a stitch that is the same thing.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.