Support

Account

Home Forums ACF PRO ACFpro frontend form missing hidden input "return"

Helping

ACFpro frontend form missing hidden input "return"

  • I updated to the new version of the ACF pro and now I can’t change the return url after the form has rendered because there is no hidden field for it.
    How do you suggest I modify the variable after the form has been rendered.

    I’m using the return variable to forward to paypal.

    http://tinytechsclub.wpengine.com/signup/?prog=199&loc=164

    When a user changes the number of students I need to update the return url with the new price and quanitity.

  • Hi @bayareawebpro

    ACF PRO serializes all the form data into 1 hidden input which prevents the ability to modify such data. This is a security measure which is now hindering your functionality.

    Looking at the acf_form_head() function found in api/api-template.php, you can see that the form data is posted via $_POST['_acf_form'].

    An easy solution would be to use PHP BEFORE the acf_form_head call, and modify the $_POST['_acf_form']['return'] data. You will not be able to do this with JS alone, but can do it all with PHP.

    Hope that helps.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘ACFpro frontend form missing hidden input "return"’ is closed to new replies.