Help save net neutrality! Learn more.

Mandatory field indicator

  • Mike Metcalfe

    Mike Metcalfe - 2010-06-18


    Is there an easy way to indicate to the user that a field is mandatory of their (like plone has the little red square)?


  • Jean Jordaan

    Jean Jordaan - 2010-06-18

    Put an asterisk next to it on the form in edit mode.
    Or put all the mandatory fields in a kupu table with a tinted background and a Required Fields heading.
    Or customize skins/cmfplomino_templates/ and/or skins/cmfplomino_templates/ etc to put the asterisk there for you.

  • Jean Jordaan

    Jean Jordaan - 2010-06-18

    It would be good if Plomino added a "mandatory" CSS class to such fields, so that you could supply a CSS file to put the red block or the asterisk there.

  • Eric Brehault

    Eric Brehault - 2010-06-18

    well, that is not the Plomino approach, Plomino forms are edited in WYSIWYG mode, the form generator just focuses on the fields themselves, the rest (labels, layout, etc…) is unchanged, so the author manage it exactly the way he wants

    if you need a marker to indicate mandatory fields, you do it in the form layout using the rich text editor


  • Jean Jordaan

    Jean Jordaan - 2010-06-20

    Yes, the rich text editor rules, but I don't see the harm in useful CSS hooks in the generated forms. Both for styling, and for when you want to bind Javascript behaviour to certain elements or element classes.

  • Eric Brehault

    Eric Brehault - 2010-06-22

    that's true, I like the idea
    we will do that


  • Mike Metcalfe

    Mike Metcalfe - 2010-06-22

    On the form layout, I've been adding the following span to make the look and feel consistent with the rest of plone:
    <span class="fieldRequired" title="Required"> (Required) </span>


Log in to post a comment.