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.