base.html.php
4 years ago
checkbox.html.php
4 years ago
file.html.php
4 years ago
hidden.html.php
4 years ago
html.html.php
4 years ago
label-content.html.php
4 years ago
label.html.php
4 years ago
radio.html.php
4 years ago
select.html.php
4 years ago
textarea.html.php
4 years ago
base.html.php
20 lines
| 1 | <?php /** @var \Give\Framework\FieldsAPI\Text $field */ ?> |
| 2 | <?php /** @var string $typeAttribute */ ?> |
| 3 | <?php /** @var string $fieldIdAttribute */ ?> |
| 4 | <input |
| 5 | type="<?php echo $typeAttribute; ?>" |
| 6 | name="<?php echo $field->getName(); ?>" |
| 7 | placeholder="<?php echo $field->getPlaceholder(); ?>" |
| 8 | id="<?php echo $fieldIdAttribute; ?>" |
| 9 | value="<?php echo $field->getDefaultValue(); ?>" |
| 10 | <?php echo $field->isRequired() ? 'required' : ''; ?> |
| 11 | <?php echo $field->isReadOnly() ? 'readonly' : ''; ?> |
| 12 | <?php echo ( $maxLength = $field->getMaxLength() ) ? "maxlength=\"$maxLength\"" : ''; ?> |
| 13 | <?php |
| 14 | if ( $conditions = $field->getVisibilityConditions() ) { |
| 15 | $conditions = esc_attr( json_encode( $conditions ) ); |
| 16 | echo "data-field-visibility-conditions=\"$conditions\""; |
| 17 | } |
| 18 | ?> |
| 19 | > |
| 20 |