Copied to clipboard

Flag this post as spam?

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


  • shinsuke nakayama 108 posts 249 karma points
    Aug 18, 2014 @ 08:05
    shinsuke nakayama
    0

    Adding Css Class to the indivisual fields in the form

    Hi guys,

    I want to add css class name to the individual fields in the form, is this possible?

    There's already a field call "CssClass" in the "FieldViewModel"

    Is it possible to extend this?

    Thank you

    Shinsuke

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 18, 2014 @ 08:55
    Tim Geyssens
    0

    Sure you can have full control over the markup so you can extend the views http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Custom-Markup/

  • shinsuke nakayama 108 posts 249 karma points
    Aug 18, 2014 @ 10:14
    shinsuke nakayama
    0

    Hi Tim,

    Thank you for your reply. Yes i have read this article, but the problem i have with this is I need to build FieldType.*.cshtml for every different type of textbox fields (different css design).

    Also the project i'm working on currently have 15 different forms so far, which looks quite different. and i wanted to avoid creating 15 different customised forms.

    so was hoping if there was anyway of adding css class from the back office, when creating a form.

    However I just realised it does generate unique class name based on the form field caption. So might able to use this instead. May have to duplicate few styling but it might work.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 18, 2014 @ 10:16
    Tim Geyssens
    0

    Yeah it should generate sufficient css classes to do your styling :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies