Text

The Text field allows adding single-line text input.

Field Parameters

Name Type Default Description
type string ‘text’ Value identifies the field types.
id string Identifies unique ID for the field. It must be different from other existing field IDs.
title string Displays the field label
desc string Describe the field option in details, appears underneath the field control.
required array Acts like boolean operator and provides the parent, comparison operation, and value which decides the field visibility.
value string Display default string in the text input.
placeholder string Default message to display when no input is inserted.

Example Declaration

array(    
    'type'  => 'text',    
    'id'    => 'attr_key',    
    'title' => esc_html__( 'Title of attr', 'your_theme_textdomain' ),    
    'desc'  => esc_html__( 'Description of attr', 'your_theme_textdomain' ),    
    'placeholder'=> esc_html__( 'Placeholder', 'your_theme_textdomain' ),       
    'value' => 'attr_value',    
    )

results matching ""

    No results matching ""