Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace wp-libreform with something based on grav #1

Open
aoloe opened this issue Aug 20, 2019 · 1 comment
Open

replace wp-libreform with something based on grav #1

aoloe opened this issue Aug 20, 2019 · 1 comment

Comments

@aoloe
Copy link
Collaborator

aoloe commented Aug 20, 2019

  • the "grav form plugin" can help (https://learn.getgrav.org/16/forms/forms)
  • the entries are saved as yaml files
  • we need to create a password protected area (without the admin plugin)
    • grav-plugin-login ?
  • and show a tabular view of the submitted data. with editing capabilities
  • and offer a csv download of all the data
  • it should support "attachments"
  • each user gets a token that enables the editing of the own values.
@aoloe
Copy link
Collaborator Author

aoloe commented Aug 20, 2019

a sample form definition by ricardo:

---
title: Contact Form

form:
    name: contact

    fields:
        name:
          label: Name
          placeholder: Enter your name
          autocomplete: on
          type: text
          validate:
            required: true

        email:
          label: Email
          placeholder: Enter your email address
          type: email
          validate:
            required: true

        message:
          label: Message
          placeholder: Enter your message
          type: textarea
          validate:
            required: true

        g-recaptcha-response:
          label: Captcha
          type: captcha
          recaptcha_not_validated: 'Captcha not valid!'

    buttons:
        submit:
          type: submit
          value: Submit
        reset:
          type: reset
          value: Reset

    process:
        captcha: true
        save:
            fileprefix: contact-
            dateformat: Ymd-His-u
            extension: txt
            body: "{% include 'forms/data.txt.twig' %}"
        email:
            subject: "[Site Contact Form] {{ form.value.name|e }}"
            body: "{% include 'forms/data.html.twig' %}"
        message: Thank you for getting in touch!
        display: thankyou
---

# Contact form

Some sample page content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant