Fires inside the profile form on the Groundhogg preferences page, after the built-in fields. Use this to add custom fields that contacts can update from the front end.
do_action( 'groundhogg/preferences/profile_form' );
This hook has no arguments. Use get_current_contact() to access the contact.
Example
add_action( 'groundhogg/preferences/profile_form', 'my_extension_add_company_field' );
/**
* Add a company name field to the preferences profile form.
*
* @return void
*/
function my_extension_add_company_field() {
$contact = \Groundhogg\get_current_contact();
$value = $contact ? esc_attr( $contact->get_company() ) : '';
echo 'Company';
echo '';
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
