<?php
/**
* input[type="hidden"] template
*
* @var $this Jet_Engine_Booking_Forms_Builder
*/
$this->add_attribute( 'required', $this->get_required_val( $args ) );
$this->add_attribute( 'name', $this->get_field_name( $args['name'] ) );
$this->add_attribute( 'data-field-name', $args['name'] );
$this->add_attribute( 'id', $this->get_field_id( $args ) );
if ( ! empty( $args['switch_on_change'] ) ) {
$this->add_attribute( 'data-switch', 1 );
}
$placeholder = isset( $args['placeholder'] ) ? $args['placeholder'] : false;
$default = isset( $args['default'] ) ? $args['default'] : false;
$this->add_attribute( 'data-default-val', esc_attr( is_scalar( $default ) ? (string) $default : '' ) );
$this->add_attribute( 'class', 'jet-form__field select-field' );
?>
<select <?php $this->render_attributes_string(); ?>><?php
if ( $placeholder ) {
$selected_placeholder = '';
if ( ! $default ){
$selected_placeholder = 'selected';
}
printf( '<option value="" %1$s>%2$s</option>', $selected_placeholder, esc_html( $placeholder ) );
}
if ( ! empty( $args['field_options'] ) ) {
foreach ( $args['field_options'] as $value => $option ) {
$selected = '';
$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 ) {
$selected = selected( $default, $val, false );
}
if ( is_array( $option ) && isset( $option['calculate'] ) ) {
$calc = ' data-calculate="' . esc_attr( $option['calculate'] ) . '"';
}
printf( '<option value="%1$s" %3$s%4$s>%2$s</option>', esc_attr( $val ), esc_html( $label ), $selected, $calc );
}
}
?></select>
| 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----- | |