/home/techb158/on-time-movers.com/wp-content/plugins/wpforms/includes/fields
Edit: /home/techb158/on-time-movers.com/wp-content/plugins/wpforms/includes/fields/class-select.php (17684B)
name = esc_html__( 'Dropdown', 'wpforms-lite' );
$this->type = 'select';
$this->icon = 'fa-caret-square-o-down';
$this->order = 70;
$this->defaults = array(
1 => array(
'label' => esc_html__( 'First Choice', 'wpforms-lite' ),
'value' => '',
'default' => '',
),
2 => array(
'label' => esc_html__( 'Second Choice', 'wpforms-lite' ),
'value' => '',
'default' => '',
),
3 => array(
'label' => esc_html__( 'Third Choice', 'wpforms-lite' ),
'value' => '',
'default' => '',
),
);
// Define additional field properties.
add_filter( 'wpforms_field_properties_' . $this->type, array( $this, 'field_properties' ), 5, 3 );
// Form frontend CSS enqueues.
add_action( 'wpforms_frontend_css', array( $this, 'enqueue_frontend_css' ) );
// Form frontend JS enqueues.
add_action( 'wpforms_frontend_js', array( $this, 'enqueue_frontend_js' ) );
}
/**
* Define additional field properties.
*
* @since 1.5.0
*
* @param array $properties Field properties.
* @param array $field Field settings.
* @param array $form_data Form data and settings.
*
* @return array
*/
public function field_properties( $properties, $field, $form_data ) {
// Remove primary input.
unset( $properties['inputs']['primary'] );
// Define data.
$form_id = absint( $form_data['id'] );
$field_id = absint( $field['id'] );
$choices = $field['choices'];
$dynamic = wpforms_get_field_dynamic_choices( $field, $form_id, $form_data );
if ( $dynamic !== false ) {
$choices = $dynamic;
$field['show_values'] = true;
}
// Set options container (