Child pages
  • Required field mark (*) is displayed for read-only fields
Skip to end of metadata
Go to start of metadata

Imported From:

In case if field is required, that red asterisk (*) is displayed after field name to indicate that it's mandatory. This makes sense, when user can enter value in field, but doesn't make sense, when field is read-only, e.g. when "inp_label" block is used instead of "inp_edit_box" block.

I propose we add new parameter to all form blocks named "required", that could have 3 values:

  • empty - automatic detection of asterisk presence;
  • 1 - always display red asterisk no matter is field required or not
  • 0 - always hide red asterisk no matter is field required or not

Related Tasks

INP-394 - Getting issue details... STATUS


  1. Yes, this sounds like a good idea.

    The only concern is about actual check for Required will it be based
    on new parameter or functionality stays the same and we are only
    adjusting the looks?


  2. You are correct, checking stays the same, this discussion is only
    about asterisk displaying.
  3. Wouldn't it make sense to have functionality for Required adjusted the
    same way?

    I realize it's not that simple and should tested throughly for
    multiple cases, but this can be very useful - don't you think?


  4. It could be useful in some cases, but this is one of low priority features,
    because of rare usability cases.

    About testing this could be very simple to test, because there are only few

       - field is initially required;
       - field is made required via OnBeforeItemUpdate/OnBeforeItemCreate event
       - field is not required.

    For each mentioned case there are only 3 parameter (that new one) values:

       - show asterisk based on actual required setting;
       - always show asterisk;
       - always hide asterisk.

    This makes 9 test cases.

    Related to setting field required dynamically from template, then we already
    have such ability. See *FieldModifier* tag for details.

  5. Here is corresponding task:

    INP-394 - Getting issue details... STATUS

    Required field
    mark (*) is displayed for read-only fields).