Function __global->member_field_is_required

Definitions

sources/cns_members_action.php

  • Find whether a member's field must be filled in.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$member_id ?MEMBER No No required parameter N/A N/A The member being edited (null: new member)
$field_class string No No required parameter email_address dob required_cpfs N/A Special code representing what kind of field it is
$current_value ?mixed No No Null N/A N/A The value the field has now (null: lookup from member record; cannot do this for a CPF)
$editing_member ?MEMBER No No Null N/A N/A The member doing the adding/editing operation (null: current member)
$adjusted_config_options array No No [] N/A N/A A map of adjusted config options

Returns

  • Whether the field must be filled in
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find whether a member's field must be filled in.
 *
 * @param  ?MEMBER $member_id The member being edited (null: new member)
 * @param  string $field_class Special code representing what kind of field it is
 * @set email_address dob required_cpfs
 * @param  ?mixed $current_value The value the field has now (null: lookup from member record; cannot do this for a CPF)
 * @param  ?MEMBER $editing_member The member doing the adding/editing operation (null: current member)
 * @param  array $adjusted_config_options A map of adjusted config options
 * @return boolean Whether the field must be filled in
 */

function member_field_is_required(?int $member_id, string $field_class, $current_value = null, ?int $editing_member = null, array $adjusted_config_options = []) : bool