Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dominic Jones 2 posts 22 karma points
    Jun 12, 2014 @ 14:08
    Dominic Jones
    0

    Simply switch between standard bootstrap Form rendering styles?

    Hi there. We make use of twitter bootstrap for most of our sites here and we're fairly new to Contour (using v3). I'm investigating means by which we can allow content editors the means of switching between Bootstrap's built in form rendering styles...

    Depending on the type of form - short, simple in-page forms benefit from the "inline" style where labels and form controls are placed side by side as opposed to the standard control-beneath label version which might be more suitable for longer forms taking up whole (or multiple!) pages.

    I'm happy editing the form.cshtml template (and the accompanying fieldtype templates) to render either type of form, but what I'm looking for is a means of allowing a content editor or developer to simply select what type of form they wish to use (from a short list of form styles). I'd like to offer a dropdown in the form's "settings" page to select from a number of different renderings, which would make contour choose a rendering-specific version of the Form/Fieldtype templates.

    The actual differences to the output HTML are pretty trivial (it may only require adding a css class to the form itself)

    How tricky is this to do? (and where would I start!)

Please Sign in or register to post replies

Write your reply to:

Draft