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

The Process section does not work in forms

Started by Muut Archive 9 years ago · 2 replies · 538 views
9 years ago

I'm trying to use plugins that work on top of the Form plugin. But none works because the actions described in the Process section are not performed.
Can not have any settings or modules?
I have been fighting this problem for a week already.

9 years ago

Hopefully looking at how the Add Page by Form plugin handles the process action helps you.

9 years ago

Excuse me, I did not quite understand what you meant ...
In https://github.com/getgrav/grav-plugin-comments/blob/develop/comments.yaml
--- yaml
buttons:

  • type: submit
    value: PLUGIN_COMMENTS.SUBMIT_COMMENT_BUTTON_TEXT

    process:

    - captcha:

    recaptcha_secret: ej32oiej23oiej32oijeoi32jeio32je

  • email:
    subject: PLUGIN_COMMENTS.EMAIL_NEW_COMMENT_SUBJECT
    body: "{% include 'forms/data.html.twig' %}"
  • addComment:
  • message: PLUGIN_COMMENTS.THANK_YOU_MESSAGE
  • reset: true

    YAML
    In https://github.com/getgrav/grav-plugin-login/blob/develop/pages/register.md
    --- yaml
    buttons:
      -
          type: submit
          value: Submit
      - 
          type: reset
          value: Reset
    
    process:
      register_user: true
      message: "You are logged in"
    

    If I add "task: smth" to the button, then I can handle this task. But the documentation says that I can use Process, but it does not work.
    The page is simply Reload

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1322 9 years ago
Archive · by Muut Archive, 9 years ago
2 917 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2922 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago