Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make PMPro Register Helper fields required for logged out users only.
if(is_user_logged_in())
$required = false;
else
$required = true;
$fields[] = new PMProRH_Field(
"company", // input name, will also be used as meta key
"text", // type of field
array(
"size"=>40, // input size
"class"=>"company", // custom class
"profile"=>true, // show in user profile
"required"=>$required // set above
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment