Support

Account

Forum Replies Created

  • Thanks for your answer.

    I have a form to pick one or * dates (repeater field), and i wish to send this by email.
    So I try to construct ‘$ticket_date’ with the different walues.

    If I send “$_POST[‘acf’][‘field_5781107cd6eaa’]” I just have “Array” in my email.
    If I send have_rows($_POST[‘acf’][‘field_5781107cd6eaa’]) I got nothing in my email.

  • Yes ! It wad the problem since the begining. At final I change the code in

    add_action( 'get_header', 'tsm_do_logged_in_author_checks' );
    function tsm_do_logged_in_author_checks() {
    
    	// Bail if not logged in or able to post
    	if ( ! ( is_user_logged_in()|| current_user_can('publish_posts') ) ) {
    		echo do_shortcode( '[wppb-login] ' );
    		return;
    	}
    
    	// Add required acf_form_head() function to head of page
    	add_action( 'get_header', 'tsm_do_acf_form_head', 1 );
    	
    	//Deregister the admin styles outputted when using acf_form
    	add_action( 'wp_print_styles', 'tsm_deregister_admin_styles', 999 );
    	
    	// Add the acf_form
    	add_action( 'genesis_entry_content', 'tsm_do_create_post_form' );
    	
    	// Catégorie
    	add_filter( 'acf/load_value/key=field_54dfccb977a11', 'vivi_load_post_category');
    }

    and this

    // Load défault categorie
    function vivi_load_post_category($field) {
    
    	// get Impro & Paris
    	$term_ids = array(28,72);
    
    	// return
    	return $term_ids;
    }

    It’s working perfectly.
    Thanks a lot John.

  • Thank you , unfortunately it is still not functional

    add_action( 'genesis_entry_content', 'tsm_do_create_post_form' );
    function tsm_do_create_post_form() {
    	// Bail if not logged in or able to post
    	if ( ! ( is_user_logged_in()|| current_user_can('publish_posts') ) ) {
    		echo do_shortcode( '[wppb-login] ' );
    		return;
    	}
    	$new_post = array(
    		'post_id'            => 'new', // Create a new post
    		'field_groups'       => array('group_54dfc93792c38', 'group_56afa46678eb3', 'group_56afa46adc147', 'group_569a815405075', 'group_56ab8bb40edcc', 'group_56bdf6aa906e1'), // Create post field group ID(s)
    		'form'               => true,
    		'return'             => '%post_url%', // Redirect to new post url
    		'html_before_fields' => '',
    		'html_after_fields'  => '',
    		'submit_value'       => 'Poster',
    		'updated_message'    => 'Saved!'
    	);
    	acf_form( $new_post );
    	
    	// Catégorie
    	add_filter('acf/load_field/key=field_54dfccb977a11', 'vivi_load_post_category');
    }
    
    function vivi_load_post_category($field) {
      $field['default_value'] = array(72);
      return $field;
    }
  • Yes, thanks.

    jQuery(function( $ ){
    
    	$(document).ready(function() {
    		$( "#acf-field_54dfc93e35ec4" ).prop( "disabled", true );
    	});	
    });
Viewing 6 posts - 1 through 6 (of 6 total)