add_attribute( 'required', $this->block_type->get_required_val( $args ) );
$this->add_attribute( 'name', $this->block_type->get_field_name( $args['name'] ) );
$this->add_attribute( 'data-field-name', $args['name'] );
$this->add_attribute( 'id', $this->block_type->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 );
?>
maybe_render_error( $args ); ?>