| 1 |
<?php |
| 2 |
/** @var \Give\Framework\FieldsAPI\Text $field */ ?> |
| 3 |
<?php |
| 4 |
/** @var string $typeAttribute */ ?> |
| 5 |
<?php |
| 6 |
/** @var string $fieldIdAttribute */ ?> |
| 7 |
<input |
| 8 |
type="<?php |
| 9 |
echo $typeAttribute; ?>" |
| 10 |
name="<?php |
| 11 |
echo $field->getName(); ?>" |
| 12 |
placeholder="<?php |
| 13 |
echo $field->getPlaceholder(); ?>" |
| 14 |
id="<?php |
| 15 |
echo $fieldIdAttribute; ?>" |
| 16 |
value="<?php |
| 17 |
echo $field->getDefaultValue(); ?>" |
| 18 |
<?php |
| 19 |
echo $field->isRequired() ? 'required' : ''; ?> |
| 20 |
<?php |
| 21 |
echo $field->isReadOnly() ? 'readonly' : ''; ?> |
| 22 |
|
| 23 |
<?php |
| 24 |
if( method_exists( $field, 'getMaxLength' ) ) { |
| 25 |
echo ($maxLength = $field->getMaxLength()) ? "maxlength=\"$maxLength\"" : ''; |
| 26 |
} |
| 27 |
?> |
| 28 |
> |
| 29 |
|