Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • micke911 5 posts 35 karma points
    Sep 08, 2021 @ 09:01
    micke911
    0

    Default selected radio button in Grid layout setting

    We have a setting defined in a grid layout where you can select a background color for a row from a radio button list. Is there some way to have one of the values selected by default so that there always will be a class set on the row?

  • Sam 79 posts 426 karma points
    May 25, 2022 @ 21:57
    Sam
    100

    I just found this out myself. You need to set the value the same as one of the pre-value's values you defined. In the example below note the "Value" setting at the very bottom. This will cause Square to be selected by default.

       [
      {
        "label": "Set Image Crop",
        "description": "",
        "key": "class",
        "view": "radiobuttonlist",
        "applyTo": "cell",
        "prevalues": [
          {
            "label": "Square",
            "value": "ImgWrap SquareImg"
          },
          {
            "label": "Landscape",
            "value": "ImgWrap  LandscapeImg"
          },
          {
            "label": "Portrait",
            "value": "ImgWrap PortraitImg"
          }
        ],
        "value": "ImgWrap SquareImg"
      }
    ]
    
Please Sign in or register to post replies

Write your reply to:

Draft