Skip to content

Instantly share code, notes, and snippets.

@ultimatemember
Last active January 22, 2020 19:03
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ultimatemember/1d81b59cd8b21f67b36c to your computer and use it in GitHub Desktop.
Save ultimatemember/1d81b59cd8b21f67b36c to your computer and use it in GitHub Desktop.
Add a hidden field to registration forms
add_action('um_after_register_fields', 'add_a_hidden_field_to_register');
function add_a_hidden_field_to_register( $args ){
echo '<input type="hidden" name="field_id" id="field_id" value="HERE_GOES_THE_VALUE" />';
}
@Uranbold
Copy link

Then how do we display this on Profile section?

	$field_custom = um_user('field_custom');
	echo $field_custom;

It seems not working

@hirenshah
Copy link

What actually is the purpose of a hidden field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment