Type: string

Used with text inputs and textarea fields, the placeholder parameter specifies a placeholder for the form field. A placeholder is text that appears in the field by default until a user enters their own information.


$args['fields'][] = array( 'type' => 'search',
                           'placeholder' => 'enter search terms' );

The above code will generate a search field like this:

Note: The ‘placeholder’ attribute is not compatible with older versions of Internet Explorer (IE 9 & below). See this page for full compatibility information.

Fields that use this parameter