I have a simple front end contact form and added another field for text input. The form is completely defined in the frontmatter and operates as shown in the grav documentation. I want to use a plugin to prefill that added field dynamically to a variety of things. I am able in the form definition to set a "default" value, but that is not dynamic. In my plugin, what event would I use to get access to the form field parameters and re-set the default value before the form is displayed? So a more general question I guess: How to use a plugin to set default values of form fields before form is displayed?
Archive
The Form plugin does not currently provide such feature. Open an issue in https://github.com/getgrav/grav-plugin-form/issues with the details of how that should work.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1334 | 9 years ago | ||
| 2 | 925 | 9 years ago | ||
| 2 | 4056 | 9 years ago | ||
| 1 | 2939 | 9 years ago | ||
| 3 | 1112 | 9 years ago |