HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/globfdxw/www/wp-content/plugins/wpforms-surveys-polls/templates/entries/dropdown.php
<?php
/**
 * Graph dropdown preview.
 *
 * @since 1.18.0
 *
 * @var string|int $id      Current dropdown ID.
 * @var string     $type    Question type, e.g. text, choice.
 * @var string     $label   Selected item label.
 * @var array      $options List of options for dropdown.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$has_options = ! empty( $options );
?>
<div class="wpforms-survey-graph-preview-questions<?php echo $has_options ? ' wpforms-survey-graph-preview-questions-dropdown' : ''; ?>">
	<div
		data-field-id="<?php echo esc_attr( $id ); ?>"
		class="wpforms-survey-graph-preview-questions-item-selected wpforms-survey-graph-preview-questions-item-selected-<?php echo esc_attr( $type ); ?>">
		<span><?php echo esc_html( $label ); ?></span>
	</div>
	<?php if ( $has_options ) { ?>
		<ul class="wpforms-survey-graph-preview-questions-list">
			<?php foreach ( $options as $field_id => $option ) { ?>
				<li data-type="<?php echo esc_attr( $option['type'] ); ?>"
					data-id="<?php echo esc_attr( $field_id ); ?>"
					class="wpforms-survey-graph-preview-question-item<?php echo $id === $field_id ? ' wpforms-survey-graph-preview-question-item-selected' : ''; ?>">
					<?php echo esc_html( $option['label'] ); ?>
				</li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>