diff --git a/js/webform_civicrm_forms.js b/js/webform_civicrm_forms.js index 6d026d03c..c5fa5b8a3 100644 --- a/js/webform_civicrm_forms.js +++ b/js/webform_civicrm_forms.js @@ -282,12 +282,7 @@ var wfCivi = (function ($, D) { if (!$.isEmptyObject(data || [])) { if (!data['']) { var text = $el.hasClass('required') ? Drupal.t('- Select -') : Drupal.t('- None -'); - if ($el.hasClass('has-default')) { - $el.removeClass('has-default'); - } - else { - $el.append(''); - } + $el.append(''); } $.each(data, function(key, val) { $el.append(''); @@ -295,7 +290,6 @@ var wfCivi = (function ($, D) { $el.val(value); } else { - $el.removeClass('has-default'); $el.append(''); } $el.removeAttr('disabled').trigger('change', 'webform_civicrm:chainselect'); @@ -340,9 +334,6 @@ var wfCivi = (function ($, D) { classes = $el.attr('class').replace('text', 'select'), id = $el.attr('id'), $form = $el.closest('form'); - if (value !== '') { - classes = classes + ' has-default'; - } $el.replaceWith(''); return $('#' + id, $form).change(function() { $(this).attr('data-val', '');