Try our conversational search powered by Generative AI!

Episerver Forms Checkbox option?


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.

Jun 13, 2017 1:35

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?

Jun 13, 2017 10:27

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.

Jun 13, 2017 19:18

You can find the template for rendering element in (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.

Jun 15, 2017 8:11

You can see more about customizing built-in templates here

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.