How to edit registration form field

Editing registration form fields

You can override registration form value and registration form fields details using filter event_registration_form_fields . Using this filter you can change fields label,value or other attributes. As shown in below example of food attribute fields and how changed value of it. You can apply filter as same like shown in the code inside your themes function.php file.


 * override registration 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: form name and form email both default value of current logged in user. You can’t override this fields value.