PHP Class Grunion_Contact_Form_Field, jetpack

Parses shortcode to output the contact form field as HTML. Validates input.
Inheritance: extends Crunion_Contact_Form_Shortcode
Afficher le fichier Open project: automattic/jetpack Class Usage Examples

Méthodes publiques

Свойство Type Description
$error Is the input invalid?
$form parent form
$shortcode_name
$value default or POSTed value

Méthodes publiques

Méthode Description
__construct ( array $attributes, null | string $content = null, Grunion_Contact_Form $form = null )
add_error ( string $message ) This field's input is invalid. Flag as invalid and add an error to the parent form
is_error ( ) : boolean Is the field input invalid?
render ( ) : string Outputs the HTML for this form field
validate ( ) Validates the form input

Method Details

__construct() public méthode

public __construct ( array $attributes, null | string $content = null, Grunion_Contact_Form $form = null )
$attributes array An associative array of shortcode attributes. @see shortcode_atts()
$content null | string Null for selfclosing shortcodes. The inner content otherwise.
$form Grunion_Contact_Form The parent form

add_error() public méthode

This field's input is invalid. Flag as invalid and add an error to the parent form
public add_error ( string $message )
$message string The error message to display on the form.

is_error() public méthode

Is the field input invalid?
public is_error ( ) : boolean
Résultat boolean

render() public méthode

Outputs the HTML for this form field
public render ( ) : string
Résultat string HTML

validate() public méthode

Validates the form input
public validate ( )

Property Details

$error public_oe property

Is the input invalid?
public $error

$form public_oe property

parent form
public $form

$shortcode_name public_oe property

public $shortcode_name

$value public_oe property

default or POSTed value
public $value