How can we help?
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 example, you can see the food attribute fields and how you can change the value of it.
Follow the below mentioned steps to Edit the Registration form fields:
- Open your Child theme.
- Apply the filter as shown in the code inside your themes function.php file.
/** * override registrations form fields * @parma $fields * @return $fields **/ function custom_function($fields) { //customize $fields $fields['food']['value'] = 'vegetables'; return $fields; } add_filter( 'event_registration_form_fields','custom_function',10,1);
Note: The form name and form email are both default values of the current logged in user and you can not make changes to this field value.