Copied to clipboard

Flag this post as spam?

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

  • Gregory 38 posts 128 karma points
    Nov 27, 2019 @ 11:31

    Umbraco Form - Theme and applying class to specific field (by name or ID)


    Quite new to Forms, and I am struggling to find any good tutorial that go through the whole process... So very likely the questions below are very basic or stupid!

    I set up my backoffice fine and created a new theme in my views > partials > themes folder.

    I am having issue however targeting specific field so I can get my form looking as it was before (I wasnt using Forms before).

    This is my form as it was (hand coded in template) enter image description here

    And this is my form as it is right now (using Umbraco Forms) enter image description here

    I might be looking at this in the wrong directio here, but here are the issues I am having:

    • How do I apply specific style to specific fields or container around that field? Looking at THIS page I should be able to target the field by name using @Html.SetFormFieldClass("some-other-class", "Password") (password being the name of the field?)... but that would only be the input field, right? Not the container around the field - which I need to be able to tailor to each field (some use the full width bootstrap class, and some dont).

    Am I doing this right? Or is this not the right way to do it and I should be looking at creating custom field types, and load each one individually into my forms.chtml at the right place?.. any tutorial on this anywhere?

    • How do I get a placeholder in my select input boxes... (I thought I could output the 'default value' similary to the 'placeholder' value for a text field.... but that's not working.
  • sami 8 posts 108 karma points
    Dec 30, 2019 @ 14:07

    hi Gregory,For me also having same issue if you found any solution, please update

Please Sign in or register to post replies

Write your reply to: