p_kses(
sprintf(
/* translators: %d is the total number of choices available. */
__('Showing the first 20 choices.
All %d choices will be displayed when viewing the form.', 'mailchimp-for-wp'),
absint($total)
),
[ 'br' => [] ]
);
echo '';
}
// Description
$this->field_preview_option('description', $field);
}
/**
* Field display on the form front-end.
*
* @since 1.0.0
* @param null $field (deprecated)
* @param array $form_data
*/
public function field_display($field, $field_atts, $form_data)
{
// Setup some defaults because WPForms broke their integration in v1.8.1.1
$field_atts = array_merge([
'input_class' => [],
'input_id' => [],
], is_array($field_atts) ? $field_atts : []);
// Setup and sanitize the necessary data
$field_required = ! empty($field['required']);
$field_class = implode(' ', array_map('sanitize_html_class', (array) $field_atts['input_class']));
$field_id = implode(' ', array_map('sanitize_html_class', (array) $field_atts['input_id']));
$form_id = absint($form_data['id']);
$field_id_int = absint($field['id']);
$choices = (array) $field['choices'];
// List
printf('