Last updated 2 years ago
Was this helpful?
This field type renders an email field.
Parameters are inherited from the field type, but the values are restricted to emails only.
The code below renders a required email field with the custom_field name, "Custom field" label and "Custom text" placeholder.
custom_field
echo ( new HivePress\Fields\Email( [ 'name' => 'custom_field', 'label' => 'Custom field', 'placeholder' => 'Custom text', 'required' => true, ] ) )->render();