after hours of trying and reading almost every blogpost about it I give up. Can somebody help me out?

My page would’t validate a nonce correctly.

Here are the excerpts:

file 1: user_frontend_form.php

$wp_nonce = wp_nonce_field('action_configurator','field_configurator');  

// Quiz Form
$page_content .= '<form action="'. $site_url .'" method="post" id="quiz" name="quiz">
    '.$wp_nonce;

...

$page_content .= '</form>';

And the file receiving the form: summary.php

if ( check_admin_referer( 'action_configurator', 'field_configurator' ) ) {
    $page_content .= '<h1>some stuff</h1>';
}

This is just an example of some things I tried. Please note that I am writing a plugin, so I am using the

$page_content .=

to setup the page for the user to view.

Thanks in advance,
Benjamin

Read more here: Cannot get wp_nonce to work


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: