Grav Guestbook Plugin
Switch branches/tags
Nothing to show
Clone or download
Latest commit 18861be Apr 18, 2017

Grav Guestbook Plugin

The Guestbook Plugin for Grav adds the ability to add a guestbook page that can receive visitor messages.


The Guestbook plugin is easy to install with GPM.

$ bin/gpm install guestbook

Or clone from GitHub and put in the user/plugins/guestbook folder.


Create a page of type guestbook, by calling its file, or by changing its type via the Admin Plugin.

Now fill that page with the form options. The default example page is:

title: Guestbook

    name: guestbook

        - name: author
          label: Name
          placeholder: Enter your name
          autofocus: on
          autocomplete: on
          type: text
            required: true

        - name: email
          label: Email
          placeholder: Enter your email address
          type: email
            required: true

        - name: text
          label: Message
          placeholder: Enter your message
          type: textarea
            required: true

        - name: date
          type: hidden
            fillWithCurrentDateTime: true

        - name: g-recaptcha-response
          label: Captcha
          type: captcha
          recaptcha_site_key: 2jj21oiej23ioej23iojeoi32jeoi3
          recaptcha_not_validated: 'Captcha not valid!'
            required: true
            ignore: true

        - type: submit
          value: Submit

        - captcha:
            recaptcha_secret: ej32uej3u2ijeiu32jeiu3jeuj32ui
        - email:
            subject: "[Site Guestbook] {{|e }}"
            body: "{% include 'forms/data.html.twig' %}"
        - save:
            filename: messages.yaml
            operation: 'add'
        - message: Thank you for writing your message!

# Add message

### Enter your message:

The page will host user messages in the form of a typical guestbook. It will show the last 30 messages with the option to load more.

Enable the Captcha anti-spam filter

To reduce spam in your comments, enable the Google Recaptcha integration we added. In the Guestbook page markdown file, add the Google Recaptcha Site Key and the Recaptcha Secret.

Where are the messages stored?

By default, in the user/data/guestbook folder.

Visualize messages

You can view messages through the Data Manager Plugin.

Email notifications

Upon receiving a message, if you set the option in the page yaml, the Email Plugin is tasked with sending an email with the details.