Support

Account

Home Forums Front-end Issues problem with acf_form and acf_verify_nonce – multiple forms in a page

Helping

problem with acf_form and acf_verify_nonce – multiple forms in a page

  • hi
    im having problem saving data from acf_form that is in a popup modal. i have on the page 2 acf_form functions and 1 that is loaded with rest api. i read many many times the guide on how to load ajax form, but no matter what i do the form is not saving.

    while trying to debug the problem i found that if i disable line 364 in form-front.php –
    if( !acf_verify_nonce('acf_form') ) return; the form saves.

    i think the problem is that the nonce is from the other forms but i cant find a way to make it work. i have acf_form_head(); before the get_header(); and in js acf.do_action('append', $('div#subscription-edit form')); after adding the form.

    what am i doing worng?

    thanks

  • the problem was fixed by switching from rest api to ajax to get the form

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

The topic ‘problem with acf_form and acf_verify_nonce – multiple forms in a page’ is closed to new replies.