fbpx

How can we help?

Contact Organizer

Create a Contact Organizer Form using the Contact Organizer Plugin. You can also create own email template for sending mail to the organizer.

Installation

You can install Google Maps plugin using 2 different ways:

  1. Automatic Installation: You can install a plugin from the backend of your WordPress. Click Here to see how you can do automatic installation.
  2. Manual Installation: You can install plugin manually using SFTP or FTP tool as well. Click Here to see how you can do manual installation.
  3. Watch this video for more clarification.

    The Contact Organizer Form

    • Once you installed and activated the Contact Organizer plugin, you will get “Contact Organizer” button at right side of the event detail page. Clicking on that button will show you contact organizer form as you can see in below screenshot:
      WP event manager Contact organizer

    Customization: Controlling Contact Organizer Button & Contact Form Place

    • The contact organizer form is hooked into the event page after the event meta place as shown below:
    • <?php
              add_action( 'single_event_listing_button_end', array( $this, 'contact_organizer_form' ) );
      ?>
      
    • To remove and move to a different place, you can do like this:
    • <?php
      
      /**
      * Move my contact organizer message place to the perfect place.
      * Show my contact organizer message after button section that way we have hooked 'single_event_listing_button_end' hook and it will show at after button section.
      * @param  array $steps
      * @return array
      * @since 1.0.0
      */ 
      
      function move_message_and_action_button() 
      {
      global $event_manager_contact_organizer;
      
          if ( has_action('single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form'  )) )
      {
         remove_action( 'single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form' ) );
      }
      
      if ( has_action('single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form')))
      {
          remove_action( 'single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form' ) );    
          add_action( 'single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form' ) );       
      }
      else
      {
         add_action( 'single_event_listing_button_end', array( $event_manager_contact_organizer, 'contact_organizer_form' ) );    
      }     
      }
      add_action( 'wp', 'move_message_and_action_button', 12 );
      
      ?>
      
    • In General, You can use your choice of the custom hook to append the form to a different place.
    • <?php
             global $event_manager_contact_organizer;
                 add_action( 'your_custom_hook', array( $event_manager_contact_organizer, 'contact_organizer_form') );
      ?>
      

    Customization: Add or Edit Contact Organizer Form Fields

    • You can customize form field with adding below filter :
    • <?php
      
      add_filter('contact_organizer_form_fields','add_custom_field_to_cgf');
      function add_custom_field_to_cgf($fields){
          //udpate existing fields
          $fields['contact_person_name']['label'] =__( 'Name label changed', 'wp-event-manager-contact-organizer' );
          //add new field
          $fields['contact_custom_name'] = array(
                              'label'=>__( 'custom Name', 'wp-event-manager-contact-organizer' ),     
                              'default' => '',                        
                              'type'  => 'text',      
                              'required'=>true,
                              'placeholder' => __( 'Please enter custom name', 'wp-event-manager-contact-organizer' ),
                              'priority'    => 1
                           );
                           
          return $fields;
          }
      
      ?>
      

    Customization: Overriding/Customizing the Template Files

    For overriding or customization, the template files can be found in the wp-event-manager-contact-organizer/templates/ directory.
    To override a template file,

    1. Create directory “wp-event-manager-contact-organizer” under your theme folder
    2. copy the template file to “/wp-content/yourtheme/wp-event-manager-contact-organizer/” directory.
    3. Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-contact-organizer/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-contact-organizer/).
    • contact-organizer.php – which generate contact form.
    • content-contact-organizer-email.php – which send mail to organizer.

    Remember: If you have overrided template file and plugin frequently updating then you need to sync template file with new updates from the plugin’s template file for better functionality and new features.

Was this article helpful?
How can we improve this article?