Forum Discussion
Adaptive card state
Is there a way to have a text field or Action to depend on the state of the card?
My case: I have a required text field with 300 chars maxLength. I need to show characters left count underneath and disable Action.Submit until after at least 1 character is entered. I can't find a way to do so. Action.Submit doesn't send data to the server if there's an empty required field, but it also doesn't change color to reflect disabled state.
Thank you!
4 Replies
- Sayali-MSFT
Microsoft
dmsaprykin AdaptiveCards supports client side input validation of Input types.
You can try the below input validation for the text field-
Input.Text- isRequired, regex, maxLength
Reference Doc-Input Validation - Adaptive Cards | Microsoft Docs- dmsaprykinCopper ContributorThank you, I know about these ones, but these props can't help with character count or showing disabled state on a button
- Sayali-MSFT
Microsoft
dmsaprykin-Currently suggested feature is not available in adaptive card.
Could you please help by suggesting this feature on - Microsoft Teams · CommunityThanks,
Sayali
-----------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- Sayali-MSFT
Microsoft
dmsaprykin- We are looking into this we will get back to you soon.