Home › Forums › ACF PRO › FR: acf_form return to permalink › Reply To: FR: acf_form return to permalink
Hi @meserlian.
I just happened to me. I put WP_DEBUG a true and I appeared the following error:
Warning: Cannot modify header information - headers already sent by...
It was solved by testing the following.
– Put on the first line of your document. Above the DOCTYPE:
<?php acf_form_head(); ?>
Do not understand why it works but it does.
I’m reviewing the plugin files to see how to fix it.
In the funciones.php file I have nothing. That code is never executed.
Only I have in my template.
$date = date('d/m/Y');
$options = array(
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'appointment',
'post_status' => 'draft',
'post_title' => 'Cita solicitada el '.$date
),
'field_groups' => array( 271 ),
'submit_value' => 'Solicitar cita'
);
acf_form( $options );
This works for me.
Sorry for my English.
Hope you serve until the bug is corrected.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.