microsoft / microsoft/AdaptiveCards

Submit Button Behavior in Consecutive Adaptive Cards

Open
#9,099 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Discussed in https://github.com/microsoft/AdaptiveCards/discussions/9097

Originally posted by ritwickbhargav80 January 25, 2025
I'm encountering an issue in Microsoft Copilot Studio where the submit button on a previous adaptive card inadvertently triggers the submission of subsequent adaptive cards.

Detailed Issue:
When multiple adaptive cards are present in a conversation flow:

  • Let's say the bot presents one adaptive card.
  • Upon submitting that adaptive card there is another adaptive card for confirmation let's call it second adaptive card.
  • If I click the submit button on the first adaptive card again; it submits the second adaptive card.
  • This unexpected behavior leads to unintended actions or data submissions.

Steps to Reproduce:

  1. Create a new Agent in Microsoft Copilot Studio.
  2. Create another topic as "Order Products" (Here is the YAML code: https://codefile.io/f/N0wXWGNmIk)
  3. Type "Order Products" in Test your agent pane
  4. It should display you an adaptive card as "Product Order Form"
  5. You fill that form and click on "Next" button
  6. It should display you another adaptive card as "Order Confirmation"
  7. Don't click on any of the button present in "Order Confirmation" adaptive card and click on the "Next" button of "Product Order Form"
  8. You'll see it bypasses that confirmation and moves to "All Other Conditions" scenario

Expected Behaviour:

  • The submit button on each adaptive card should only trigger the submission of data associated with that specific card.
  • Subsequent adaptive cards should only be submitted when their respective submit buttons are clicked.

Queries:

  • I would like to know if this behavior is intended or if there's a way to disable or control the submission behavior of previous adaptive cards from Adaptive Card or Microsoft Copilot Studio?
  • If this functionality is not yet available, are there any recommended best practices, alternative approaches or workarounds to handle this scenario with Adaptive Cards or from the Microsoft Copilot Studio?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading discussion #9097 and following the reported Microsoft Copilot Studio reproduction steps for consecutive Adaptive Cards. Determine whether the behavior is expected and document a confirmed fix, control, or workaround that prevents the earlier card's submit button from submitting a later card.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.