Home Forums Front-end Issues javascript error with image in front end Reply To: javascript error with image in front end

  • i put acf_form_head() before get_header();

    my code basically is:

    $post = get_post(get_the_ID()); // of course i did wp_query() and the_post() first
    $options = array(
    	'post_id' => $post->ID, // post id to get field groups from and save data to
    	'field_groups' => array(), // this will find the field groups for this post (post ID's of the acf post objects)
    	'form_attributes' => array( // attributes will be added to the form element
    		'class' => ''
    	'return' => add_query_arg( 'updated', 'true', get_permalink() ), // return url
    	'html_field_open' => '<div>', // field wrapper open
    	'html_field_close' => '</div>', // field wrapper close
    	'html_before_fields' => '', // html inside form before fields
    	'html_after_fields' => '', // html inside form after fields
    	'submit_value' => 'edit', // value for submit field
    	'updated_message' => 'edited', // default updated message. Can be false to show no message
    acf_form( $options );

    which is nothing special.