<?php
/**
* input[type="hidden"] template
*/
$required = $this->get_required_val( $args );
$name = $this->get_field_name( $args['name'] );
$default = ! Jet_Engine_Tools::is_empty( $args['default'] ) ? $args['default'] : false;
$data_switch = '';
if ( $required ) {
$required = 'required="required"';
}
if ( ! empty( $args['switch_on_change'] ) ) {
$data_switch = ' data-switch="1"';
}
if ( ! empty( $args['field_options'] ) ) {
echo '<div class="jet-form__fields-group checkradio-wrap">';
foreach ( $args['field_options'] as $value => $option ) {
$checked = '';
$calc = '';
if ( is_array( $option ) ) {
$val = isset( $option['value'] ) ? $option['value'] : $value;
$label = isset( $option['label'] ) ? $option['label'] : $val;
} else {
$val = $value;
$label = $option;
}
if ( $default || '0' === $default ) {
$checked = checked( $default, $val, false );
}
if ( is_array( $option ) && isset( $option['calculate'] ) ) {
$calc = ' data-calculate="' . esc_attr( $option['calculate'] ) . '"';
}
$custom_template = false;
if ( ! empty( $args['custom_item_template'] ) ) {
$custom_template = $this->get_custom_template( $val, $args, $checked );
}
?>
<div class="jet-form__field-wrap radio-wrap checkradio-wrap">
<?php if ( $custom_template ) {
echo $custom_template;
} ?>
<label class="jet-form__field-label">
<input
type="radio"
name="<?php echo esc_attr( $name ); ?>"
class="jet-form__field radio-field checkradio-field"
value="<?php echo esc_attr( $val ); ?>"
data-field-name="<?php echo esc_attr( $args['name'] ); ?>"
<?php echo $checked; ?>
<?php echo $required; ?>
<?php echo $calc ? wp_kses_post( $calc ) : ''; ?>
<?php echo $data_switch ? wp_kses_post( $data_switch ) : ''; ?>
>
<?php echo esc_html( $label ); ?>
</label>
</div>
<?php
}
if ( $custom_template ) {
wp_reset_postdata();
wp_reset_query();
}
echo '</div>';
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| calculated.php | 2026-07-21 14:15 | 1.91 KB | 76129f60960:kunden | -xw-x----- | |
| checkboxes.php | 2026-07-21 14:15 | 2.25 KB | 76129f60960:kunden | -xw-x----- | |
| date.php | 2026-07-21 14:15 | 549 B | 76129f60960:kunden | -xw-x----- | |
| datetime-local.php | 2026-07-21 14:15 | 571 B | 76129f60960:kunden | -xw-x----- | |
| group-break.php | 2026-07-21 14:15 | 82 B | 76129f60960:kunden | -xw-x----- | |
| heading.php | 2026-07-21 14:15 | 66 B | 76129f60960:kunden | -xw-x----- | |
| hidden.php | 2026-07-21 14:15 | 345 B | 76129f60960:kunden | -xw-x----- | |
| media.php | 2026-07-21 14:15 | 2.25 KB | 76129f60960:kunden | -xw-x----- | |
| number.php | 2026-07-21 14:15 | 660 B | 76129f60960:kunden | -xw-x----- | |
| page-break.php | 2026-07-21 14:15 | 785 B | 76129f60960:kunden | -xw-x----- | |
| radio.php | 2026-07-21 14:15 | 1.95 KB | 76129f60960:kunden | -xw-x----- | |
| range.php | 2026-07-21 14:15 | 1022 B | 76129f60960:kunden | -xw-x----- | |
| select.php | 2026-07-21 14:15 | 1.74 KB | 76129f60960:kunden | -xw-x----- | |
| submit.php | 2026-07-21 14:15 | 840 B | 76129f60960:kunden | -xw-x----- | |
| text.php | 2026-07-21 14:15 | 2.04 KB | 76129f60960:kunden | -xw-x----- | |
| textarea.php | 2026-07-21 14:15 | 759 B | 76129f60960:kunden | -xw-x----- | |
| time.php | 2026-07-21 14:15 | 549 B | 76129f60960:kunden | -xw-x----- | |
| wysiwyg.php | 2026-07-21 14:15 | 1.39 KB | 76129f60960:kunden | -xw-x----- | |