Changing the priority of field for event submission form

Changing the priority of field for event submission form

Changing the priority of field like country field for events

This tutorial will show you how you can edit fields with the Editing Event Submission Form Fields doc and display it on a single event listing.

Changing the priority of field for the frontend’s event submission form

Open up your theme functions.php field and create a function to add a new field to the events section. First hook it in:

  1. add_filter( 'submit_event_form_fields', 'frontend_add_country_field' );

Then write the function:

  1.   function frontend_add_country_field( $fields ) {
  2.   $fields['event']['event_country'] = array(
  3.     'label'       => __( 'Country ($)', 'event_manager' ),
  4.     'type'        => 'text',
  5.     'required'    => true,
  6.     'priority'    => 2 ,
  7.     'placeholder' => 'e.g. germmany'
  8.   );
  9.   return $fields;
  10. }

This change the priority of field for an event field priority of the frontend events form that has the label “Country”, is required, priority has 2.

Changing the field’s priority of the the backend’s event submission form

Again in theme functions.php, hook in your custom function:

  1. add_filter( 'event_manager_event_listing_data_fields', 'admin_add_country_field' );
Then write your custom function:

  1. function admin_add_country_field( $fields ) {
  2.   $fields['_event_country'] = array(
  3.     'label'       => __( 'Country ($)', 'event_manager' ),
  4.     'type'        => 'text',
  5.     'placeholder' => 'e.g. germmany',
  6.     'priority'    => 2 ,
  7.     'description' => ''
  8.   );
  9.   return $fields;
  10. }
    • Related Articles

    • Remove existing field from event submission form

      Removing fields from event the event submission form In this guide, you will learn about how you can remove existing fields from the event submission form and how you can remove some social fields from the organizer section. Remove existing field ...
    • Editing Event Submission Form Fields

      There are mainly 2 ways to customize the form fields in WP Event Manager : Using the Field editor option from the admin panel. Using the WordPress hooks (filters) which are explained below. Using the field editor option from the admin panel To add, ...
    • Changing the event slug/permalink

      In this guide, we will show you how you can change or customize the event slug or permalink. It usually appears like this: http://yoursite.com/events/event-listing-title in the default settings. To customize this with WP Event Manager, you can use ...
    • Add a custom field in the search form on the event dashboard

      In order to add customize search filters to the event dashboard, please enter the following code in the functions.php file: add_action('event_manager_event_dashboard_event_filter_start', 'my_theme_custom_filter'); function my_theme_custom_filter() { ...
    • Editing The Registration Form Fields

      In WP Event Manager, you can easily edit the Registration form value along with other form field details using the Filter event_registration_form_fields. The Filter allows you to change the field label, value and other attributes. In the following ...