Bot Framework V3, How to get Adjacent Submit Action buttons in an adaptive card with c#
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.
It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.
botframework adaptive-cards
add a comment |
I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.
It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.
botframework adaptive-cards
add a comment |
I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.
It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.
botframework adaptive-cards
I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.
It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.
botframework adaptive-cards
botframework adaptive-cards
asked Nov 29 '18 at 5:19
Ravindra VarmaRavindra Varma
32
32
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.
A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.
Hope this helps.
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Set due date"
}
],
"width": 1
},
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Comment"
}
],
"width": 1
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532331%2fbot-framework-v3-how-to-get-adjacent-submit-action-buttons-in-an-adaptive-card%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.
A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.
Hope this helps.
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Set due date"
}
],
"width": 1
},
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Comment"
}
],
"width": 1
}
add a comment |
Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.
A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.
Hope this helps.
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Set due date"
}
],
"width": 1
},
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Comment"
}
],
"width": 1
}
add a comment |
Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.
A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.
Hope this helps.
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Set due date"
}
],
"width": 1
},
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Comment"
}
],
"width": 1
}
Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.
A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.
Hope this helps.
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Set due date"
}
],
"width": 1
},
{
"type": "Column",
"selectAction": {
"type": "Action.OpenUrl",
"url": "https://www.microsoft.com/"
},
"items": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Large",
"weight": "Bolder",
"color": "Accent",
"text": "Comment"
}
],
"width": 1
}
edited Nov 30 '18 at 18:20
answered Nov 29 '18 at 23:28
tdurnfordtdurnford
942119
942119
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532331%2fbot-framework-v3-how-to-get-adjacent-submit-action-buttons-in-an-adaptive-card%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown