Hi All,
My apologies if this has been asked before. I haven't been able to find a definitive answer.
I have a custom form with has been cut up by our front end developer, which has some pretty nice styling around radio boxes, but quite custom markup.
I've followed the Custom form field templates section of http://doc.silverstripe.org/framework/en/topics/forms and everything was going fine until I got to the radio boxes. I'm pretty sure that OptionsetField is the correct form field type to output radio boxes.
To play around, I've done this in my custom form constructor:
$fields = new FieldList(
OptionsetField::create('thing', 'select a thing', array('thing1' => 'thing1', 'thing2' => 'thing2'))
);
But when doing this:
$Fields.dataFieldByName(thing)
In my layout, I get default html coming out including an unordered list and default label tags. I need these to be completely custom.
Can anyone please give me some advice around the recommended way to customize this output?
Cheers,
Ben.