question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AdaptiveCards: Number inputs don't display the value 0

See original GitHub issue

Version

Latest version from CDN

Description

Adaptive inputs of type Input.Number don’t display the value 0.

image

To Reproduce

Steps to reproduce:

  1. Go to Adaptive Cards Designer
  2. Select Bot Framework WebChat as the host app
  3. 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"
}
  1. 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:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
corinagumcommented, Jul 16, 2019

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.

1reaction
tdurnfordcommented, Jul 16, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found