Answer the question
In order to leave comments, you need to log in
Transition through pages through the form, why?
Good afternoon,
I saw the following helpers in phoenixframework:
button("hello", to: "/world")
#=> <form action="/world" class="button" method="post">
<input name="_csrf_token" value="">
<button type="submit">hello</button>
</form>
button("hello", to: "/world", method: "get", class: "btn")
#=> <form action="/world" class="btn" method="get">
<button type="submit">hello</button>
</form>
Answer the question
In order to leave comments, you need to log in
Form as a transition is stupid.
Here it is necessary to rely on the general practice of the web.
Forms are search(get) and modification(post(PATCH/PUT DELETE))
https://hexdocs.pm/phoenix_html/Phoenix.HTML.Link.html
Useful to make sure the link will not be called by search engines for indexing.
My opinion
Well, with the same success, you can insert js (non-standard logic)
Looks like a perversion
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question