Botframework-composer: How to show multiple buttons in Hero Card

Created on 18 Nov 2020  路  5Comments  路  Source: microsoft/BotFramework-Composer

How to show multiple buttons in Hero Card

I am trying to show multiple hero card button but all it renders is json. Please see screenshot and LG form
What Works -

[HeroCard
    title = Welcome to Service Desk, I'm Sandy!
    subtitle = Sandvik IT Hub
    text = If you want to get information about common IT questions, get help with things like how to reset your password or contact your local Service Desk, or create a Service Desk Ticket, you've come to the right place!\n\nJust type your question or press the button below to get started.
    buttons= ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')}
]

What I am expecting - having multiple buttons in hero card

[HeroCard
  >Rest Keeping same
    buttons= [${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')}, ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')}]
]

Which gives me output

Screenshots

Capture

Version 1.2.1 Bot Framework Composer

Bot Services Question customer-replied-to customer-reported

Most helpful comment

[HeroCard
buttons= ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')} | ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')}
]

All 5 comments

hi @pramodkn

This document here shows to surround an array with ${ }, but that didn't work for me either.

https://docs.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#create-an-array

I'm investigating.

Hello @dmvtech I've tried all the way wrapping array of object, putting Card Action in Array of object, putting raw json of Card action in array of object but none of them work to show multiple buttons for hero card.

[HeroCard
buttons= ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')} | ${CardActionTemplate('imBack', 'Show more cards', 'Show more cards')}
]

Thank you @cxbuilders! That's it.

@pramodkn Can you please test that approach and confirm it works for you?

Thanks @dmvtech @cxbuilders
Using | symbol works for me!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pedro-ramirez-suarez picture pedro-ramirez-suarez  路  15Comments

sujeongHeo picture sujeongHeo  路  15Comments

hraz-msft picture hraz-msft  路  21Comments

DS2019 picture DS2019  路  21Comments

KoradaRajesh picture KoradaRajesh  路  25Comments