Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Give a Form Fieldset an ID


3 Posts   354 Views


16 August 2012 at 2:46am Community Member, 95 Posts

How can i give a form fieldset an id?

or would have to do a custom form?

eg: php code

   $fields = new FieldSet(


only gives me
front end output

but i want <fieldset id="delegates">

and it needs to be on a fieldset not a div or other TAG

any ideas?


17 August 2012 at 8:10pm Forum Moderator, 5511 Posts

The fieldset class doesn't wrap the fields in a 'fieldset' (terrible naming). It's actually part of the template ( so you'd either need to do a custom template or put the ID on a div within the fieldset.


17 August 2012 at 10:34pm Community Member, 95 Posts

thanks for the info.
I was using a piece of javascript found at
to duplicate fields and was stuck and thinking the js would only work on the <filedset> id, but luckily it can work on a div as well.