Skip to content

Function

Get a form field.

tml_get_form_field( string|Theme_My_Login_Form $form, string $field )

Parameters

$form string|Theme_My_Login_Form
The form name or object.
$field string
The field name.

Return

Theme_My_Login_Form_Field|bool The field object false if it doesn't exist.

Source

function tml_get_form_field( $form, $field ) {

    $form = tml_get_form( $form );
    if ( ! $form ) {
        return false;
    }

    return $form->get_field( $field );
}

Uses

Changelog

VersionDescription
7.0 Introduced.