What is the purpose of. in form action="." method="post"?

2

I'm starting in Django and making some code changes already written by someone. I noticed that in form instead of the usual "/action page" where the data will be submitted, such as in this W3Schools example:

<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"> 
    
asked by anonymous 16.02.2017 / 23:02

1 answer

4

This is only related to HTML. The client has to send the data of the form to some page, and there in the action you say which, until then you already know. If you want to send to the page itself where the form is you would like to? You can enter the full address of the page. Or you can simply put a point that is the same thing.

    
17.02.2017 / 00:13