diff --git a/lib/picker.js b/lib/picker.js index cfb59f5c..07d91700 100644 --- a/lib/picker.js +++ b/lib/picker.js @@ -667,10 +667,21 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { */ function prepareElementHidden() { - var id = [ - typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', - typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' - ] + var id, + name + + if ( SETTINGS.hiddenName === true ) { + id = ELEMENT.name + '_hidden' + name = ELEMENT.name + ELEMENT.name = '' + } + else { + name = [ + typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', + typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' + ] + name = id = name[0] + ELEMENT.name + name[1] + } P._hidden = $( '