Support

Account

Home Forums Front-end Issues ACF Integration with Community Events Plugin (The Events Calendar) Reply To: ACF Integration with Community Events Plugin (The Events Calendar)

  • Following up:

    I tried registering the form first with <?php acf_register_form( $settings ); ?> but this did not work either. I’m not sure if I’m entering the code wrong, or if I’m on the wrong path entirely.

    Here it is with acf_register_form:

    <?php
    /**
     * Event Submission Form
     * The wrapper template for the event submission form.
     *
     * Override this template in your own theme by creating a file at
     * [your-theme]/tribe-events/community/edit-event.php
     *
     * @since    3.1
     * @version  4.5
     *
     * @var int|string $tribe_event_id
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	die( '-1' );
    }
    
    if ( ! isset( $tribe_event_id ) ) {
    	$tribe_event_id = null;
    }
    
    ?>
    
    <?php tribe_get_template_part( 'community/modules/header-links' ); ?>
    
    <?php do_action( 'tribe_events_community_form_before_template', $tribe_event_id ); ?>
    
    <?php acf_register_form( $settings );
    
    $settings = array(
    /* (string) Unique identifier for the form. Defaults to 'acf-form' */
    	'id' => 'acf-group_59dd13c80be9e',
    	
    	/* (boolean) Whether or not to create a form element. Useful when a adding to an existing form. Defaults to true */
    	'form' => false
    			
    );?>
    
    <form method="post" enctype="multipart/form-data" data-datepicker_format="<?php echo esc_attr( tribe_get_option( 'datepickerFormat', 0 ) ); ?>">
    	<input type="hidden" name="post_ID" id="post_ID" value="<?php echo absint( $tribe_event_id ); ?>"/>
    	<?php wp_nonce_field( 'ecp_event_submission' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/title' ); ?>
    	
    	<?php acf_form( $options );
    	$settings = array(
    
    	/* (string) Unique identifier for the form. Defaults to 'acf-form' */
    	'id' => 'acf-group_59dd13c80be9e',
    	
    	/* (boolean) Whether or not to create a form element. Useful when a adding to an existing form. Defaults to true */
    	'form' => false
    			
    );?>
    
    	<?php tribe_get_template_part( 'community/modules/description' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/datepickers' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/image' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/taxonomy', null, array( 'taxonomy' => Tribe__Events__Main::TAXONOMY ) ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/taxonomy', null, array( 'taxonomy' => 'post_tag' ) ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/venue' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/organizer' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/website' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/custom' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/cost' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/spam-control' ); ?>
    
    	<?php tribe_get_template_part( 'community/modules/submit' ); ?>
    </form>
    
    <?php do_action( 'tribe_events_community_form_after_template', $tribe_event_id ); ?>