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 109 posts 250 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

  • Comment author was deleted

    Aug 18, 2014 @ 08:55

    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 109 posts 250 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.

  • Comment author was deleted

    Aug 18, 2014 @ 10:16

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

Please Sign in or register to post replies

Write your reply to:

Draft