clone and readonly

Support MB Group clone and readonlyResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26809
    DavideDavide
    Participant

    If I set a group with clone=true and readonly=true, I expect the group and its fields to be read only, instead, only fields are read only while the group itself still permits to add and remove clones.

    #26810
    Long NguyenLong Nguyen
    Moderator

    Hi Davide,

    Thank you for reaching out.

    The group field does not support adding the setting readonly. This setting only applies to some simple fields like text, url, email, checkbox, radio, date, time, datetime which are sub-fields inside the group.

    #26811
    DavideDavide
    Participant

    I have some posts that once in a state needs to have some values read only, and some of them are cloned groups. Is there a way to show a readonly group or should I keep using readonly and hide the add and remove buttons with some js?

    #26817
    Long NguyenLong Nguyen
    Moderator

    Hi,

    For some flexible cases, I think you can try to use the extension MB Conditional Logic. Example, you can show/hide a field base on a checkbox.
    https://docs.metabox.io/extensions/meta-box-conditional-logic/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.