Card Choices Interface Component

Certified Associate Developer

I am trying to use a!cardChoiceField but need capability to adjust the size of the cards, specifically make them wider. The documentations says to put the card choices component in a columns layout with a specified width to control the number of cards in each row. How do I do it?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Please try this . you can modify it as per your requirement 

    a!localVariables(
    local!save,
    local!data: todatasubset(
    {
    { id: 1, name: "A" },
    { id: 2, name: "B" },
    { id: 3, name: "C" }
    },
    a!pagingInfo(1, - 1)
    ),
    {
    a!columnsLayout(
    columns: a!forEach(
    items: local!data,
    expression: {
    a!columnLayout(
    contents: a!cardLayout(
    contents: {
    a!richTextDisplayField(
    value: a!richTextItem(text: fv!item.name)
    )
    },
    link: a!dynamicLink(value: fv!index, saveInto: local!save)
    )
    )
    }
    )
    )
    }
    )

Reply
  • 0
    Certified Senior Developer

    Please try this . you can modify it as per your requirement 

    a!localVariables(
    local!save,
    local!data: todatasubset(
    {
    { id: 1, name: "A" },
    { id: 2, name: "B" },
    { id: 3, name: "C" }
    },
    a!pagingInfo(1, - 1)
    ),
    {
    a!columnsLayout(
    columns: a!forEach(
    items: local!data,
    expression: {
    a!columnLayout(
    contents: a!cardLayout(
    contents: {
    a!richTextDisplayField(
    value: a!richTextItem(text: fv!item.name)
    )
    },
    link: a!dynamicLink(value: fv!index, saveInto: local!save)
    )
    )
    }
    )
    )
    }
    )

Children