Renders the output for the protector before the Submit button.
Description
See also
Parameters
- $form
-
(awsmug\Torro_Forms\DB_Objects\Forms\Form) (Required) Form object.
Source
File: src/modules/protectors/honeypot.php
public function render_output( $form ) { $prefix = $this->module->manager()->get_prefix(); /** This filter is documented in src/db-objects/elements/element.php */ $input_classes = apply_filters( "{$prefix}element_input_classes", array( 'torro-element-input' ) ); /** This filter is documented in src/db-objects/elements/element.php */ $label_classes = apply_filters( "{$prefix}element_label_classes", array( 'torro-element-label' ) ); /** This filter is documented in src/db-objects/elements/element.php */ $wrap_classes = apply_filters( "{$prefix}element_wrap_classes", array( 'torro-element-wrap' ) ); /** This filter is documented in src/db-objects/elements/element.php */ $description_classes = apply_filters( "{$prefix}element_description_classes", array( 'torro-element-description' ) ); /** This filter is documented in src/db-objects/elements/element.php */ $errors_classes = apply_filters( "{$prefix}element_errors_classes", array( 'torro-element-errors' ) ); $label = $this->get_form_option( $form->id, 'skip_field_label' ); if ( empty( $label ) ) { $label = $this->get_default_skip_field_label(); } $data = array( 'id' => 0, 'container_id' => 0, 'label' => $label, 'sort' => 0, 'type' => 'honeypot', 'value' => '', 'input_attrs' => array( 'id' => 'torro-email', 'name' => 'email', 'class' => implode( ' ', $input_classes ), ), 'label_required' => '', 'label_attrs' => array( 'id' => 'torro-email-label', 'class' => implode( ' ', $label_classes ), 'for' => 'torro-email', ), 'wrap_attrs' => array( 'id' => 'torro-email-wrap', 'class' => implode( ' ', $wrap_classes ), ), 'description' => '', 'description_attrs' => array( 'id' => 'torro-email-description', 'class' => implode( ' ', $description_classes ), ), 'errors' => array(), 'errors_attrs' => array( 'id' => 'torro-email-errors', 'class' => implode( ' ', $errors_classes ), ), 'before' => '', 'after' => '', ); torro()->template()->get_partial( 'element', $data ); }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |