Skip to main content
Known Participant
Mar 25, 2022 12:32 PM UTC
Question

Error in collapsible box layout

My requirement is whenever I have error inside a box layout the collapsible box layout should look like this

Can anyone help me with this please.

    2 replies

    stefanhelzle0001
    Brainy
    Mar 25, 2022 12:56 PM UTC

    By default, this boxLayout will un-collapse and show a similar message. Did you try that? Does it not fit your requirements?

    peter.lewis
    Employee
    Mar 25, 2022 1:01 PM UTC

    This is the default behavior of a box if there are validation errors in any of the fields in the contents of the box. Just make sure you have a validation or character limit and it should trigger this behavior. Here's an example:

    a!boxLayout(
      label: "Box Layout",
      contents: {
        a!textField(
          label: "Test",
          characterLimit: 2,
          value: "abc"
        )
      }
    )