getgrav / getgrav/grav-plugin-form
Different page loaded after submission
- Dominant language
- PHP
- Stars
- 64
- Forks
- 80
- Avg merge
- 10h 13m
- Merged PRs (30d)
- 9
Description
When specifying the form in a different page and load it via twig, the url of the page gets loaded where the form is specified.
```
{% include "forms/form.html.twig" with { form: forms('unique-form-name') } %}
```
A current workaround is to set action to an empty string: `''`. I also want to note that the action defaults to the via constructor passed in `$page->route()`. Not only that this causes the issue, maybe `route` should be rather `url` here, but I will need to investigate some more.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the form included from forms/form.html.twig, including forms('unique-form-name'), the action value, and the constructor's $page->route(). Confirm how submission chooses the destination when the form is rendered on another page; done means submission remains on the page containing the form without requiring an empty action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100