Announcement

Collapse
No announcement yet.

flex.json list property - item_prompt_property not working, shows [object Object]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    flex.json list property - item_prompt_property not working, shows [object Object]

    I am building a custom Basic architecture Flex Component (no MMX dependency) with a list property type using list_type: "group". I am trying to use item_prompt_property to display a label for each list item in the Page Builder UI, but it is not working as expected.

    When item_prompt_property is set to any property code (e.g. "heading" or a dedicated "slide_name" text field), the list displays [object Object] instead of the property value as the item label.

    When item_prompt_property is removed entirely, the list items display with no label at all - just a blank row with an arrow to open the item's properties.

    My list property definition looks like this:


    Code:
    json
    
    {
    "code": "slides",
    "prompt": "Slides",
    "type": "list",
    "list_type": "group",
    "item_prompt_property": "heading",
    "properties": [
    {
    "code": "heading",
    "prompt": "Heading",
    "type": "text"
    }
    ]
    }


    Questions:
    • Is item_prompt_property supported for Basic architecture components, or only for MMX/Shadows components?
    • Is there a correct syntax for displaying a property value as the list item label in the Page Builder UI?
    • Is there an alternative way to give list items a human-readable label so editors can identify slides without opening each one?

    Psydde Delicious
    Delicious Boutique & Corseterie
    Philadelphia, PA
    www.DeliciousBoutique.com
    www.DeliciousCorsets.com

    #2
    delcorsets

    Is item_prompt_property supported for Basic architecture components, or only for MMX/Shadows components?

    - No. It's a Page Builder admin UI feature, processed entirely by the Miva admin interface. It is not aware of whether your component is Basic, Web Component, or MMX.

    Is there a correct syntax for displaying a property value as the list item label in the Page Builder UI?

    Code:
    {
      "code": "slides",
      "prompt": "Slide",
      "type": "list",
      "list_type": "group",
      "properties": [
         {
           "code": "heading",
           "prompt": "Heading",
           "type": "text"
         }]
    }
    With prompt: "Slide" and no item_prompt_property, items render as Slide 1, Slide 2, Slide 3 in the list — human-readable enough for most editors.

    Also, during Camp Miva we released a very helpful AI Skill that will help create Miva Page Builder Flex Components. The skill can be found here: https://docs.miva.com/mivalabs

    I have found that the Claude Skill works extremely well but you have to remember that it will not be perfect on the first time around. You will need to have several iterations with context to create a properly functioning Flex Component. Feel free to reach out to me for any specific questions.
    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment


      #3
      Nick Thanks, I'm actually using that skill and had it assist me in phrasing the original question, and this one, to describe the problem being encountered.

      Based on your suggestion, we did additional testing:

      What we tried:

      Following your example, we set "item_prompt_property" to a plain type: "text" field code with the correct syntax:


      Code:
      json
      
      {
      "code": "slides",
      "prompt": "Corset Slide",
      "type": "list",
      "list_type": "group",
      "item_prompt_property": "slide_image_alt",
      "properties": [
      {
      "code": "slide_image_alt",
      "prompt": "Slide Image Alt Text",
      "type": "text"
      }
      ]
      }


      We tested pointing item_prompt_property at multiple fields including a dedicated slide_name text field (first position in the list), line2 (a text field with existing saved data), and slide_image_alt (a plain text field). All produced the same result.

      Results:
      • With item_prompt_property set to any field code, all list items display [object Object] regardless of whether that field has data saved or not
      • With item_prompt_property removed entirely, list items display completely blank — no numbered labels like "Corset Slide 1, Corset Slide 2" as your response suggested should happen


      Is automatic numbered labeling (Slide 1, Slide 2, etc.) dependent on a specific Miva version? And is the [object Object] issue a known bug in any particular version?
      Last edited by delcorsets; 03-23-26, 10:05 AM.
      Psydde Delicious
      Delicious Boutique & Corseterie
      Philadelphia, PA
      www.DeliciousBoutique.com
      www.DeliciousCorsets.com

      Comment


        #4
        Are you missing the :value suffix?

        Most of the time it will be the property_code : value, but properties can provide various values to surface their label (like the :code value for a product, category, breakpoint property)

        Here are some of Shadows’ example: https://github.com/search?q=repo%3Am...erty&type=code
        Nicholas Adkins
        Technical Training Specialist / Miva, Inc.
        [email protected]
        https://www.miva.com/mivalearn

        Comment


          #5
          Nick Thank you Nick — that was exactly it!

          Adding the :value suffix to the property code fixed it immediately. The correct syntax is:


          Code:
          json
          
          "item_prompt_property": "slide_image_alt:value"

          List items are now displaying the value as the label as expected.

          For context I asked Claude to explain why this wasn't caught earlier:

          "I'm working with an AI assistant (Claude) to build these components, and there is a Miva Flex Component skill file installed to help guide it. However the skill documentation didn't include the :value suffix requirement for item_prompt_property, so the AI was generating the bare property code without it. This is useful feedback for anyone maintaining that skill — adding a working example of item_prompt_property with the :value suffix would help others avoid the same issue."

          Thanks for the information!
          Psydde Delicious
          Delicious Boutique & Corseterie
          Philadelphia, PA
          www.DeliciousBoutique.com
          www.DeliciousCorsets.com

          Comment


            #6
            delcorsets Thanks for the information. We tried to account for everything but looks like this was missed when the Skill was created. I have updated the Skill file at https://docs.miva.com/mivalabs with the new information if you want to download the new skill and update yours. I am working on getting this in a GitHub repo so that you can see the updates make to the Skill. Once I have more information I will put up a post on the forum.
            Nicholas Adkins
            Technical Training Specialist / Miva, Inc.
            [email protected]
            https://www.miva.com/mivalearn

            Comment

            Working...
            X