title: Adaptive Cards Submit actions
body: <p>I have generated an adaptive card using JSON format with two buttons submit and cancel which are returning a "messageBack" message as submit and cancel respectively.
  I am using C# to access the reply but I am not able to figure out how to access the reply from the adaptive card.</p>
  
  <p>My json is</p>
  
  <pre><code>    {
        "type": "AdaptiveCard",
        "selectAction": {        
          "type": "Action.Submit"
        },
        "body": [
          {
            "type": "TextBlock",
            "horizontalAlignment": "Center",
            "size": "Large",
            "weight": "Bolder",
            "color": "Accent",
            "text": "Meeting Composer Create"
          },
          {
            "type": "ColumnSet",
            "columns": [
              {
                "type": "Column",
                "items": [
                  {
                    "type": "TextBlock",
                    "horizontalAlignment": "Left",
                    "spacing": "Medium",
                    "size": "Medium",
                    "weight": "Bolder",
                    "color": "Accent",
                    "text": "Attendees:"
                   }
                ],
                "width": "stretch"
              },
              {
                "type": "Column",
                "items": [
                  {
                    "type": "TextBlock",
                    "id": "attendeeVal",
                    "text": "a"
                  }
                ],
                "width": "stretch"
              }
            ]
          },
          {
            "type": "ColumnSet",
        "columns": [
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "size": "Medium",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Subject:"
              }
            ],
            "width": "stretch"
          },
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "id": "subVal",
                "text": "meeting"
              }
            ],
            "width": "stretch"
          }
        ]
      },
      {
        "type": "ColumnSet",
        "columns": [
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "size": "Medium",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Date:"
              }
            ],
            "width": "stretch"
          },
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "id": "dateVal",
                "text": "17/11/2018 10.30 AM"
              }
            ],
            "width": "stretch"
          }
        ]
      },
      {
        "type": "ColumnSet",
        "columns": [
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "size": "Medium",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Document Name:"
              }
            ],
            "width": "stretch"
          },
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "id": "docVal",
                "text": "Document1"
              }
            ],
            "width": "stretch"
          }
        ]
      }
    ],
    "actions": [
      {
        "type": "Action.Submit",
        "title": "Submit",
        "data": {
          "msteams": {
            "type": "messageBack",
            "displayText": "I clicked this button",
            "text": "text to bots",
            "value": "Submit"
          }
        }
      },
      {
        "type": "Action.Submit",
        "title": "Cancel",
        "data": {
          "msteams": {
            "type": "messageBack",
            "displayText": "I clicked this button",
            "text": "text to bots",
            "value": "Cancel"
          }
        }
      }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
  }
  </code></pre>
  
  <p>my C# is </p>
  
  <pre><code> var response = getCard(stepContext, "Aditya Rao, Vishal Subramaniam" , "Scrum Meeting" , "17/11/1028, 10:30AM" , "Scrum Sprint.pptx");
   await stepContext.Context.SendActivityAsync(response).ConfigureAwait(false);
  </code></pre>
  
  <p>my additional function to support are</p>
  
  <pre><code>private static Attachment CreateAdaptiveCardAttachment(string filePath, string names, string subj , string datee, string docs)
      {
          var adaptiveCardJson = File.ReadAllText(filePath);
          dynamic obj = JsonConvert.DeserializeObject(adaptiveCardJson);
          obj["body"][1]["columns"][1]["items"][0]["text"] = names;
          obj["body"][2]["columns"][1]["items"][0]["text"] = subj;
          obj["body"][3]["columns"][1]["items"][0]["text"] = datee;
          obj["body"][4]["columns"][1]["items"][0]["text"] = docs;
          var adaptiveCardAttachment = new Attachment()
          {
              ContentType = "application/vnd.microsoft.card.adaptive",
              Content = obj,
          };
          return adaptiveCardAttachment;
      }
  
  
      // Create an attachment message response.
      private Activity CreateResponse(Activity activity, Attachment attachment)
      {
          var response = activity.CreateReply();
          response.Attachments = new List&lt;Attachment&gt;() { attachment };
          return response;
      }
  
  
      private Activity getCard(WaterfallStepContext stepContext, string names, string subj , string datee, string docs)
      {
          var jsonFilePath = @".\Dialogs\CardTemplates\MeetingComposerCreate.json";
          var activity = stepContext.Context.Activity;
          var adCard = CreateAdaptiveCardAttachment(jsonFilePath,names,subj,datee,docs);
          var response = CreateResponse(activity, adCard);
          return response;
      }
  </code></pre>
  
  <p>How do I access the values response once submit or cancel is clicked?</p>
  
  <p>Also if someone can help me find how to get reply from input.choice to get the checkbox data of the selected cards.</p>