end-form-row.php
3 years ago
end-form.php
3 years ago
end-page.php
3 years ago
field-column.php
3 years ago
field-description.php
3 years ago
field-label.php
3 years ago
field-message.php
3 years ago
field-row.php
3 years ago
messages.php
3 years ago
prev-page-button.php
3 years ago
start-form-row.php
3 years ago
start-form.php
3 years ago
start-page.php
3 years ago
field-row.php
49 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Row-layout field template |
| 4 | * |
| 5 | * @var $template |
| 6 | * @var $label |
| 7 | * @var $desc |
| 8 | * @var Base $this |
| 9 | */ |
| 10 | |
| 11 | use Jet_Form_Builder\Blocks\Render\Base; |
| 12 | use Jet_Form_Builder\Classes\Tools; |
| 13 | |
| 14 | $fullwidth = ' content-fullwidth'; |
| 15 | |
| 16 | //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped |
| 17 | |
| 18 | /* |
| 19 | * We return the prepared field template. |
| 20 | * Each of the listed variables is validated in separate files. |
| 21 | * |
| 22 | * $label - './field-label.php' |
| 23 | * $desc - './field-description.php' |
| 24 | * $template - '../fields/{$field_type}.php' ( takes place at the level of a separate field template ) |
| 25 | */ |
| 26 | |
| 27 | ?> |
| 28 | <?php if ( $this->get_field_label() || $this->get_field_desc() ) : ?> |
| 29 | <div class="jet-form-builder-col__start"> |
| 30 | <?php |
| 31 | // Read the comment above. |
| 32 | echo Tools::esc_template_string( $label ); |
| 33 | echo Tools::esc_template_string( $desc ); |
| 34 | |
| 35 | // Reset fullwidth content if we have label or description for field. |
| 36 | $fullwidth = ''; |
| 37 | |
| 38 | ?> |
| 39 | </div> |
| 40 | <?php endif; ?> |
| 41 | <div class="jet-form-builder-col__end<?php echo esc_attr( $fullwidth ); ?>"> |
| 42 | <?php |
| 43 | // Read the comment above. |
| 44 | echo Tools::esc_template_string( $template, false ); |
| 45 | |
| 46 | //phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped |
| 47 | ?> |
| 48 | </div> |
| 49 |