Form
form.RdWhen used within a template(), a form implementation is injected that
wraps htmltools::tags$form().
Value
(When injected) An htmltools::tag object.
Details
When a request context is available, freshwater adds optional behaviors such as CSRF token insertion and HTTP method spoofing.
Calling form() outside of template() rendering will result in an error.
For a plain form tag in normal R code, use htmltools::tags$form().
Method Spoofing
If method is one of "put", "patch", or "delete", a hidden _method
input is added and the HTML form method is set to "post".
Browsers only support GET and POST. When method is "put", "patch", or "delete", freshwater renders a POST form with a hidden _method field. Middleware interprets this as the effective HTTP method. Requires freshwater context-enabled middleware.