eg. a markup element in a form that contain something like

$form['fieldsetname']['fieldN']=array('#value'=>'text text <a href="link">pippo</a>');

get rendered by JS as if the <a> tag was inside a <div class="fieldset-wrapper">

workaround is wrapping everything in another div

Comments

dave reid’s picture

Status: Active » Closed (works as designed)

As far as I can tell, this is by design. If you have elements inside of a collapsible fieldset, they need to be wrapped in <div class="fieldset-wrapper"> so that everything inside the field set actually can be collapsed.