web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adaptive Card Make inp...
Power Automate
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
        }
Categories:
I have the same question (0)
  • akashindori1234 Profile Picture
    61 on at

    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.

  • maheshBI Profile Picture
    6 on at

    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

    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.

  • roverton Profile Picture
    12 on at

    Use this 

    "associatedInputs": "none" for your cancel button

     

    Supporting document 

  • Suggested answer
    EnoqMaps Profile Picture
    2 on at
    Hi, according to this latest update from Microsoft below.
     
    You will need to use the
     
    "associatedInputs": "none"
     
    like
     
    {
                        "type": "Action.Submit",
                        "title": "REJECT",
                        "id": "btnReject",
              "associatedInputs": "none"
                    }
           ]
            },
            {
                "type": "Input.Text",
                "placeholder": "Comments",
                "id": "txtComments",
                "isMultiline": true,
          "isRequired": true,
          "errorMessage": "Please enter your Comment"
            }

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard