Problem with Select in HJSON

This is what I currently have:

        {
          name: size
          attribute: size
          title: Size
          type: select
          options: [
            {title: "Extra Small", value: "xs"},
            {title: "Small", value: "sm"},
            {title: "Medium", value: "md"},
            {title: "Large", value: "lg"},
            {title: "Extra Large", value: "xl"},
            {title: "Extra Extra Large", value: "xxl"}
          ]
          defaultValue: md
          help: "Avatar size using predefined design tokens"
        }

But it does not show up in the UI

I have tried text instead of title without luck.

What does Wappler expect the construction to be?

From my Sanitize-HTML module:

        {
          "name": "disallowedTagsMode",
          "optionName": "disallowedTagsMode",
          "title": "Disallowed Tags Mode",
          "type": "droplist",
          "values": [
            {
              "title": "Discard",
              "value": "discard"
            },
            {
              "title": "Escape",
              "value": "escape"
            },
            {
              "title": "Recursive Escape",
              "value": "recursiveEscape"
            }
          ],

I believe the issue is that you have the type as select, rather than droplist, unless you're aiming for something else I'm not aware of

1 Like

Whoa! Thank you so much.

The strange part is that I started with a droplist and when I could not get it to work, I decided to ask AI for assistance resulting in the type as select.

No worries! Full credit goes to whoever told me it was droplist ages ago, because I remember also having this issue after assuming it would be select. It'd probably be a nice improvement if it accepted both as I think select is more standard

1 Like