REOPEN: Initial value for choose parameter with object as value

In my previous thread, I reported a bug where the initial value of a new component containing a choose field that selects between two sets of objects is [object Object]. I’m aware that this has been a known bug.

Well, since 6.4.0, it no longer displays that string in the field on initial load, but it just shows an empty text field with a back button that returns to the choose UI. That is with no “initial” value set. See screenshot.

According to this thread, there is not current support for setting an initial value for a parameter that is using an object as a value (and I hope you all are still working on that). But is there a way to make the initial value “unselected”, so that neither button is selected and it doesn’t show a blank text field? I hope that makes sense.

I think I register. You aren’t using an initial so it puts you in that weird state? Do you want to send me your parameters just so I can double check. I think I’ll have a fix for you next week. We changed the control choose to work with objects better in 6.4 and hopefully you can check that as well as I think you brought that up once. Thanks for the info!

@charlie,

Thanks for getting back to me!

Even when I choose an initial value, it doesn’t seem to register the label as a valid selector for the initial even if I wanted to. So, I could add "initial" : "Foundations", to cat, but all it does is show the text “Foundations” in the text field and that object is clearly not selected. I think a screenshot would help. The circled area in the sidebar should show an option selected, and the circled area in the canvas should look like the section below it.

Here are my parameters (without initial):

{
    "cat" : {
      "label": "Category Type",
      "type": "choose",
      "options": [
        {
          "value": {
            "color": "#a6380a",
            "title": "Foundations for Victory"
          },
          "label": "Foundations"
        },
        {
          "value": {
            "color": "#f26321",
            "title": "Areas of Restoration"
          },
          "label": "Restoration"
        }
      ]
    },
    "title" : {
      "type" : "text",
      "label" : "Page Title",
      "initial" : "{{dc:post:title}}"
    },
    "bg" : {
      "type" : "image",
      "label" : "Background Image",
      "initial" : "3952:full"
  }
}

Thanks for the reference. You will be all good on Monday. Let me know if not and have a great weekend.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.