web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / How to hide the adapti...
Copilot Studio
Unanswered

How to hide the adaptive card form after user click on Submit button

(0) ShareShare
ReportReport
Posted on by 21

Hi there,

 

I have a Power Virtual Agent bot to prompt for user input. I am using Bot Framework Composer to develop the adaptive card form. But after user click on the Submit button, the form will still appear in the Teams chat.

Is there any way to hide the adaptive card form after user click on Submit button?

 

BotForm.png

 

Code sample

# adaptivecardjson_StartUpdateForm(StaffName, StaffVendor, ARTDate, PCRDate, MOHProtocol, DateInOffice, FloorWorkstation, Recovered, RecoveryDate, ppCloseContact, OfficeArea)
- ```{
 "type": "AdaptiveCard",
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.3",
 "body": [
 {
 "type": "TextBlock",
 "size": "Medium",
 "weight": "Bolder",
 "text": "Update Staff COVID-19 Positive Result",
 "wrap": true,
 "color": "Accent"
 },
 {
 "type": "Container",
 "items": [
 {
 "type": "FactSet",
 "facts": [
 {
 "title": "Staff Name",
 "value": "${StaffName}"
 },
 {
 "title": "Staff/Vendor",
 "value": "${StaffVendor}"
 },
 {
 "title": "ART Positive Date",
 "value": "${ARTDate}"
 },
 {
 "title": "PCR Positive Date",
 "value": "${PCRDate}"
 },
 {
 "title": "MOH Protocol",
 "value": "${MOHProtocol}"
 },
 {
 "title": "Date Last in Office",
 "value": "${DateInOffice}"
 },
 {
 "title": "Floor and Workstation",
 "value": "${FloorWorkstation}"
 }
 ]
 }
 ],
 "style": "emphasis"
 },
 {
 "type": "Input.ChoiceSet",
 "choices": [
 {
 "title": "Yes",
 "value": "Yes"
 },
 {
 "title": "No",
 "value": "No"
 }
 ],
 "label": "Recovered?",
 "style": "expanded",
 "id": "Recovered",
 "value": "${Recovered}",
 "separator": true,
 "isRequired": true
 },
 {
 "type": "Input.Date",
 "id": "RecoveryDate",
 "placeholder": "Enter a date",
 "label": "Recovery Date",
 "errorMessage": "This is a required input",
 "min": "2022-01-01",
 "value": "${RecoveryDate}"
 },
 {
 "label": "Close Contact",
 "type": "Input.ChoiceSet",
 "choices.data": {
 "type": "Data.Query",
 "dataset": "graph.microsoft.com/users"
 },
 "id": "ppCloseContact",
 "isMultiSelect": true,
 "value": "${ppCloseContact}"
 },
 {
 "type": "Input.Text",
 "placeholder": "Office Area Accessed (more than 15 mins)",
 "label": "Office Area Accessed (more than 15 mins)",
 "id": "OfficeArea",
 "value": "${OfficeArea}"
 }
 ],
 "actions": [
 {
 "type": "Action.Submit",
 "title": "SUBMIT"
 }
 ]
}```

 

Categories:
I have the same question (1)
  • Expiscornovus Profile Picture
    33,970 Most Valuable Professional on at

    Hi @john_then,

     

    I have found this thread on Github about disabling the card after an action. Worth having a look at that discussion:

    https://github.com/microsoft/BotFramework-WebChat/issues/1427

     

    In that thread they have shared the code snippet below. That might work, but I haven't been able to test it yet on my bots though 😄

    <Components.AdaptiveCardContent actionPerformedClassName="card__action--performed"
     content={attachment.content}
     disabled={recentBotMessage}
     />

     

    Hope this helps a bit?

     

  • john_then Profile Picture
    21 on at

    Hi @Expiscornovus,

     

    Thanks for your prompt reply.

    I am using Bot Framework Composer and I am not sure how to add the code snippet above to hide the form.

     

    In addition, my PVA Chat bot is only published on MS Teams and not any other channels.

     

    Do you mind to provide me some example screenshots on the Bot Framework Composer?

  • bikashb Profile Picture
    23 on at

    Anyone was able to do this? I have same use case.

  • Sohom Rik Profile Picture
    53 on at

    Facing a similar scenario and seeking your advice. Any insights or guidance would be greatly appreciated.

  • Viswav Profile Picture
    92 on at

    Tried so many ways and still can't figure this out 😕 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
sannavajjala87 Profile Picture

sannavajjala87 210 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 153

#3
Haque Profile Picture

Haque 119

Last 30 days Overall leaderboard