Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Adaptive Card Make input field required depending on submit button

(0) ShareShare
ReportReport
Posted on by 2

I am creating a flow which posts an adaptive card to a Teams Chat.

The flow has 2 action.submit buttons (Approve & Reject) and one input.text field.

Is it possible that when a user clicks the Reject button it makes the input.text required, but when approve button is clicked input.text is optional?

   {
            "type": "ActionSet",
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "APPROVE",
                    "id": "btnApprove"
                },
                {
                    "type": "Action.Submit",
                    "title": "REJECT",
                    "id": "btnReject"
                }
            ]
        },
        {
            "type": "Input.Text",
            "placeholder": "Comments",
            "id": "txtComments",
            "isMultiline": true
        }
  • roverton Profile Picture
    12 on at
    Re: Adaptive Card Make input field required depending on submit button

    Use this 

    "associatedInputs": "none" for your cancel button

     

    Supporting document 

  • akashindori1234 Profile Picture
    61 on at
    Re: Adaptive Card Make input field required depending on submit button

    I know about  "isRequired": true.

     

    I have two buttons, Submit and Cancel.

     

    If the user clicks Cancel, I want to exit the adaptive card and not display messages such as 'this field is required'.

     

    However if the user clicks Submit I want required fields to be entered before futher processing.

  • maheshBI Profile Picture
    6 on at
    Re: Adaptive Card Make input field required depending on submit button

    Can you be more specific on what you need exactly. In fact if you need a text input that must be required to complete, let me show you this :

            {
                "type""Input.Text",
                "placeholder""Comments",
                "id""txtComments",
                "isMultiline"true
                  "isRequired": true,
                 "errorMessage": "you must complete this"
            }
     
    Try this and Let me know if this is what you need
  • akashindori1234 Profile Picture
    61 on at
    Re: Adaptive Card Make input field required depending on submit button

    Were you able to figure out how to implement this? I am in the same situation where depending on the user's intent(specific button clicked), different fields are required or optional.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492