Skip to content

Method

Render the form element.

render_form( )

public

Return

string The form markup.

Source

public function render_form() {
    $output = '<form name="' . esc_attr( $this->get_name() ) . '" action="' . esc_url( $this->get_action() ) . '" method="' . esc_attr( $this->get_method() ) . '"';
    foreach ( $this->get_attributes() as $key => $value ) {
        $output .= ' ' . $key . '="' . esc_attr( $value ) . '"';
    }
    $output .= ">\n";

    foreach ( $this->get_fields() as $field ) {
        $output .= $field->render() . "\n";
    }

    $output .= "</form>\n";

    return $output;
}

Uses

Used by

Changelog

VersionDescription
7.1.4 Introduced.