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, edit or delete form fields in the event submission form using the field editor option, follow the below mentioned steps:
- Go to Event Manager >> Field Editor.
- Add fields and customize them.
- Save changes.
Editing the event submission form fields at the frontend side
Altering occasion accommodation fields are conceivable by means of the submit_event_form_fields channel.
Including some code will permit you to alter different fields, or include new ones.
Check the below-mentioned image to see how to change a field’s label:
// Add your own function to filter the fields add_filter( 'submit_event_form_fields', 'custom_submit_event_form_fields' ); function custom_submit_event_form_fields( $fields ) { // Here we target one of the event fields (event_title) and change it's label $fields['event']['event_title']['label'] = "Custom Label"; // And return the modified fields return $fields; }
Editing submission form fields at the admin side
Fields in the administrator are of comparative structure and can be altered utilizing the “event_manager_event_listing_data_fields” channel. Every field takes a marker, placeholder, sort and depiction contentions.
Check the below mentioned image to find an example on how to change a field’s label:
// Add your own function to filter the fields add_filter( 'event_manager_event_listing_data_fields', 'custom_event_manager_event_listing_data_fields' ); function custom_event_manager_event_listing_data_fields( $fields ) { // Here we target one of the event fields (location) and change it's placeholder $fields['_event_location']['placeholder'] = "Custom placeholder"; // And return the modified fields return $fields; }