Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Set Form fields defaults from plugin

Started by Muut Archive 10 years ago · 1 replies · 560 views
10 years ago

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?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1999 9 years ago
Archive · by Muut Archive, 9 years ago
2 1342 9 years ago
Archive · by Muut Archive, 9 years ago
2 4548 9 years ago
Archive · by Muut Archive, 9 years ago
1 3401 9 years ago
Archive · by Muut Archive, 9 years ago
3 1492 9 years ago