Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input.Text not displaying when used with isRequired: true #4653

Closed
14 tasks
petru-guider opened this issue Apr 15, 2024 · 1 comment
Closed
14 tasks

Input.Text not displaying when used with isRequired: true #4653

petru-guider opened this issue Apr 15, 2024 · 1 comment
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@petru-guider
Copy link

petru-guider commented Apr 15, 2024

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

Microsoft-BotFramework/3.1
botframework-connector/4.22.1
core-http/3.0.4
Node/v18.19.0
OS/(arm64-Darwin-23.4.0)

Describe the bug

Adaptive Card Input.Text not displaying when used with isRequired: true.

To Reproduce

Steps to reproduce the behavior:

  1. Make a GET request to /api/notify endpoint with a route handler sends a proactive message using following card
await context.sendActivity({
  attachments: [
    CardFactory.adaptiveCard({
      body: [
        {
          type: 'TextBlock',
          text: 'Text area',
        },
        {
          type: 'Input.Text',
          id: 'id',
          placeholder: 'Placeholder text',
          maxLength: 500,
          isMultiline: true,
        },
      ],
      actions: [
        {
          type: 'Action.Submit',
          title: 'Submit',
        },
      ],
    }),
  ],
});
  1. Check bot framework
  2. Card is displayed properly
    image
  3. Add isRequired after isMultiline
  4. Make another GET request to /api/notify
  5. Card is not displayed properly
    image

Expected behavior

Input.Text works properly with isRequired: true.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

I'm also using Input.ChoiceSet and it works fine with isRequired: true.

Tracking Status

Dotnet SDK TODO

  • PR
  • Merged

Javascript SDK TODO

  • PR
  • Merged

Python SDK TODO

  • PR
  • Merged

Java SDK TODO

  • PR
  • Merged

Samples TODO

  • PR
  • Merged

Docs TODO

  • PR
  • Merged

Tools TODO

  • PR
  • Merged
@petru-guider petru-guider added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Apr 15, 2024
@tracyboehrer tracyboehrer transferred this issue from microsoft/botframework-sdk Apr 24, 2024
@stevkan stevkan self-assigned this Apr 24, 2024
@stevkan
Copy link

stevkan commented Apr 24, 2024

@petru-guider - Thank you for your patience. It seems that when using the isRequired property, it is necessary to include the label and errorMessage properties, as well. I did a cursory search and didn't see this stated anywhere obvious in their docs. I only discovered the requirement when looking at the dev console for the browser where a couple warnings where displayed. Curiously, the Adaptive Cards Designer didn't produce any errors or warnings when I ran the card there. Anyhow, once I included the additional fields, the card rendered without issue.

Closing a resolved.

@stevkan stevkan closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

2 participants