November Happy Hour will be moved to Thursday December 5th.

Episerver Forms Checkbox option?

Vote:
 

I'm using Episerver.Forms v 4.5.1 with Episerver 10.4.3 in an MVC project and I just realized when I went to build some forms there's no checkbox element? There's a "Multiple or Single Choice" element, but even when you only provide one choice the resulting HTML is just a radio button with only one option, which is not ideal as once it's checked you can't uncheck it. Am I missing something is there a checkbox element? I have changed every setting this element provides hoping to get a checkbox but to no avail.

#179456
Jun 13, 2017 1:35
Vote:
 

Check the box "Allow multiple choices" in form element setting will render the element as checkbox. Is this what you want or I missing something?

#179465
Jun 13, 2017 10:27
Vote:
 

Doh Yes! Thank you I knew it had to be something simple I was missing. 

Follow up question: How can I control the HTML output of the checkbox element? Or any of these elements? For example I'd prefer for better styling flexibility that the checkbox itself not be nested inside the label element.

#179489
Jun 13, 2017 19:18
Vote:
 

You can find the template for rendering element in EPiServer.Forms.zip (in your project's modules folder). Just modify it and put it into the path "~/Views/Shared/ElementBlocks", the element will be render using your custom template.

#179545
Jun 15, 2017 8:11
Vote:
 

You can see more about customizing built-in templates here http://world.episerver.com/documentation/developer-guides/forms/searching-block-templates/

#179619
Jun 16, 2017 12:15
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.