add_attribute( 'required', $this->get_required_val( $args ) ); $this->add_attribute( 'name', $this->get_field_name( $args['name'] ) ); $this->add_attribute( 'data-field-name', $args['name'] ); $this->add_attribute( 'id', $this->get_field_id( $args ) ); if ( ! empty( $args['switch_on_change'] ) ) { $this->add_attribute( 'data-switch', 1 ); } $placeholder = isset( $args['placeholder'] ) ? $args['placeholder'] : false; $default = isset( $args['default'] ) ? $args['default'] : false; $this->add_attribute( 'data-default-val', $default ); $this->add_attribute( 'class', 'jet-form__field select-field' ); ?>