Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Positioning of error labels in (user generated) forms

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 347 Views
  • kokoalberti
    Avatar
    Community Member
    1 Post

    Positioning of error labels in (user generated) forms Link to this post

    Hi All,
    New to SS here, having a great time trying out all sorts of new stuff! Unfortunately I ran into a little snag on positioning the error labels on my forms. I hate ugly forms, and while the validation of a set of radio buttons works great, the error label (when no option is selected) is positioned directly after the first radio box, and I'd really really like it to be somewhere else like after the group of radio buttons. Situation now with label.required being in a strange place:

    <ul id="Form_Form_EditableRadioField7" class="optionset requiredField">
       <li class="odd valStudent_-_20_EUR">
          <input id="Form_Form_EditableRadioField7_Student20EUR" class="radio required" type="radio" value="Student - 20 EUR" name="EditableRadioField7">
          <label class="required" for="EditableRadioField7" generated="true">Choose a registration</label>
          <label for="Form_Form_EditableRadioField7_Student20EUR">Student - 20 EUR</label>
       </li>
       <li class="even valStaff_-_30_EUR"> (...) </li>
       <li class="odd valRegular_-_40_EUR"> (...) </li>
    </ul>

    I can't seem to position it properly either with CSS, and I'm not sure where this particular order/label positioning is generated, somewhere within the UGF code, or is it because the jquery form validator just appends it right after the radio input? Or is there some SS code somewhere that tells the jquery form validation to put it there? Any idea what my best bet is for getting around this?

    I've attached a screenshot of the form to show the situation a bit more clearly. Thanks!

    regards,
    Koko

    Attached Files
    347 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.