id = 'user_registration_select'; $this->form_id = 1; $this->registered_fields_config = array( 'label' => __( 'Select', 'user-registration' ), 'icon' => 'ur-icon ur-icon-drop-down', ); $this->field_defaults = array( 'default_label' => __( 'Select', 'user-registration' ), 'default_field_name' => 'select_' . ur_get_random_number(), 'default_options' => array( __( 'First Choice', 'user-registration' ), __( 'Second Choice', 'user-registration' ), __( 'Third Choice', 'user-registration' ), ), ); } /** * Get Registered admin fields. */ public function get_registered_admin_fields() { return '
  • ' . $this->registered_fields_config['label'] . '
  • '; } /** * Validate field. * * @param [object] $single_form_field Field Data. * @param [object] $form_data Form Data. * @param [string] $filter_hook Hook. * @param [int] $form_id Form id. */ public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) { // Perform custom validation for the field here ... } } return UR_Form_Field_Select::get_instance();