Jump to content

form doesn't work when cached


DarsVaeda
 Share

Recommended Posts

I'm trying to send a simple form like this:

<form action="<?= $page->url ?>" method="post">
    <div class="intro_text"><edit html_textarea><?= $page->html_textarea ?></edit></div>
    <?php
        var_dump($_POST);
        if (isset($_POST['send'])) {
            include __DIR__.'/scripts/contact_mail.php';
        }
    ?>
    <!-- some fields -->
</form>

This works as long as I'm logged in aka the page is not cached. As soon as I log out the form data is not send seemingly. I can see the page is reloading but the var_dump is just empty.

How am I supposed to do this in processwire?

Link to comment
Share on other sites

  • 7 months later...
On 30/05/2017 at 12:19 PM, Zeka said:

Hi @DarsVaeda

You should specify GET or POST variables in cache settings for this template ( there is an input for this at the bottom of cache settings screen.)

Or specify * for all parameters. 

This looks like just what I need. Will try this when I get home, thanks @Zeka

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...