AdaptiveCards: Number inputs don't display the value 0
See original GitHub issueVersion
Latest version from CDN
Description
Adaptive inputs of type Input.Number
don’t display the value 0
.
To Reproduce
Steps to reproduce:
- Go to Adaptive Cards Designer
- Select
Bot Framework WebChat
as the host app - Paste the following json in the
Card Payload Editor
:
{
"type": "AdaptiveCard",
"actions": [
{
"title": "Submit",
"type": "Action.Submit"
}
],
"body": [
{
"text": "Input 1",
"type": "TextBlock"
},
{
"id": "InputOne",
"placeholder": "Input 1 Placeholder",
"type": "Input.Number",
"value": 10
},
{
"text": "Input 2",
"type": "TextBlock"
},
{
"id": "InputTwo",
"placeholder": "Input 2 Placeholder",
"type": "Input.Number",
"value": -10
},
{
"text": "Input 3",
"type": "TextBlock"
},
{
"id": "InputThree",
"placeholder": "Input 3 Placeholder",
"type": "Input.Number",
"value": 0
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
- See that the third input is not displaying the expected value
Additional Info
This card was created using the C# AdaptiveCards package 1.2.0 This card will render correctly in the Emulator
[Bug]
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Input.Number - Schema Explorer | Adaptive Cards
Hint of minimum value (may be ignored by some clients). 1.0. placeholder, string, No, Description of the input desired. Displayed when no selection...
Read more >Display number in adaptive card - Stack Overflow
Am I missing something, is there a type for a text box that lets display numbers or is this by design and I...
Read more >Adaptive Card Error - Invalid Json - Power Platform Community
Hi! In the Adaptive Cards I have designed so far, I close body before declaring actions. Not 100% sure this is the problem,...
Read more >Getting Data from an Adaptive Card in Microsoft Teams
This video will will explain how to get data from Adaptive Cards in Microsoft Teams. ... add new input elements and see the...
Read more >Showing and hiding content in Adaptive Cards
In Adaptive Cards there are multiple ways to show and hide content ... Next double-click the button, to display the hidden card and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce this by sending the same json to Mock Bot for rendering
copy-pasting the json to the Adaptive Cards schema reproduces this issue, but manually assigning the value 0 in the schema editor shows the value 0 as expected.
@jodufra
I opened an issue in the Adaptive Cards Repo. You can track it here https://github.com/microsoft/AdaptiveCards/issues/3237. Thank you for pointing out this issue.