Trouble getting itemLabel to display labels on group[] list

{
  "verse-list"	:	{
    "type"			: "group[]",
    "label"			:	"List of Verses",
    "itemLabel"	: "{{verse-ref}}",
    "params"		: {
      "verse-text"	:	{
        "type"		: "text-editor",
        "label"		: "Verse Text",
        "initial"	: "Jesus wept."
      },
      "verse-ref"		: {
        "type"		: "text",
        "label"		:	"Reference",
        "initial"	: "John 11:35"
      }
    }
  }
}

In creating the component with the parameters above, everything works except for the itemLabel. It’s just showing the actual text {{verse-ref}}. Not sure what I’m doing wrong.

Hey Bobby,

Please follow the format of Parameter Grouping here: https://theme.co/docs/parameters#nested-grouping

If that is not what you’re looking for, please tell us your concerns about the setup in the doc.

Thanks.

I’m not asking about nested groupings. At all. I’m talking about the “List” item spoke about here: https://theme.co/docs/parameters#lists.

As far as I can tell, I’ve followed the format exactly, but the ”itemLabel” : “{{verse-ref}}” isn’t working as expected. I’m referencing an value within my list item as the label of the list item, just as in the example (only they used ”itemLabel" : "{{index}}. {{title}}"), but the list item is only showing the text {{verse-ref}}.

Please tell me what I’m doing wrong or let me know if there’s a bug.

I think I figured it out. For some reason, the itemLabel wasn’t liking my dash (-) in the parameter name. I took the dash out of the name (changed from verse-ref to ref and it works great now. You may want to check your code and escape the - character.

Here is my working code:

{
 "verse-list"	:	{
   "type"			: "group[]",
   "label"			:	"List of Verses",
   "itemLabel"	: "{{ref}}",
   "params"		: {
     "verse-text"	:	{
       "type"		: "text-editor",
       "label"		: "Verse Text",
       "initial"	: "Jesus wept."
     },
     "ref"		: {
       "type"		: "text",
       "label"		:	"Reference",
       "initial"	: "John 11:35"
     }
   }
 }
}

Hello @bobbybosler,

You might need to remove the dash in all other parameters as well. Kindly update the JSON into this:

{
  "verse-list"	:	{
    "type"			: "group[]",
    "label"			:	"List of Verses",
    "itemLabel"	: "{{verseref}}",
    "params"		: {
      "versetext"	:	{
        "type"		: "text-editor",
        "label"		: "Verse Text",
        "initial"	: "Jesus wept."
      },
      "verseref"		: {
        "type"		: "text",
        "label"		:	"Reference",
        "initial"	: "John 11:35"
      }
    }
  }
}

Best Regards.

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