Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Adding custom form data to the page

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

I have created a from field in my admin area to have an additional piece of content for the page. What do I need to add to the page to grab this data and place it on the page? I am using the following sample code in my blueprint:

YAML
      fields:
        header.an_example_text_field:
          type: text
          label: Add a number
          default: 5
          validate:
            required: true
            type: int
10 years ago

just add in your template
{{ page.header.anexampletext_field }}
and it should output the content saved in the admin

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5336 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago