Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Userforms numeric field

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 795 Views
  • MCK
    Avatar
    Community Member
    9 Posts

    Userforms numeric field Link to this post

    I have made a new numeric field successfully (based on text field) but where do I change the class name that appears in the html. I need to be able to target this field specifically in the .css file and right now it has a class of "field text" -- as do all other text fields. I can see no .ss files that controls this. Do I need to make a new file .ss? If so, what do I call it and what should it contain?

    Thanks

    Graeme McKinstry

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Userforms numeric field Link to this post

    You can add classes to form fields using addExtraClass, simply change your numeric fields getFormField() to call addExtraClass() before you return it.

    795 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.