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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Poll module need help

Go to End

2 Posts   1105 Views


Community Member, 1 Post

14 June 2009 at 9:30am

I'm trying to update the below code

<li class="even val2"><input id="ShowPoll_MyPoll_PollAnswer_2" name="PollAnswer" type="radio" value="2" class="radio" /> <label for="ShowPoll_MyPoll_PollAnswer_2">This is label 1</label></li>


<li class="even val2"><label for="ShowPoll_MyPoll_PollAnswer_2"><input id="ShowPoll_MyPoll_PollAnswer_2" name="PollAnswer" type="radio" value="2" class="radio" /> This is label 1</label></li>

I can't understand which php file or css is generating the below data .


<% control Fields %>

<% end_control %>
<div class="clear"><!-- --></div>


Forum Moderator, 5523 Posts

14 June 2009 at 9:46pm

Edited: 14/06/2009 9:48pm

I think the code you want to change is in CheckboxSetField.php in the function Field(). Sadly the existing formfields are all generated from the PHP rather then template files so it makes it a bit of a mission to change that 1 thing. Ideally all the html should be stripped out into templates. Hopefully we can make this happen if the form improvements for 2.4 go ahead.

Any reason why you need to change it? might be easier to just use CSS. (messy I know) but its that or you edit the CheckboxSetField field function (you could try and decorate the function)