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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disable Toggle once su...
Power Apps
Answered

Disable Toggle once submitted.

(2) ShareShare
ReportReport
Posted on by 19

Snap.PNGHi Powerappers,

 

Question...

 

How do i disable the toggle button after i have submitted my form and i return to that screen?

 

 

 

Display = If(Toggle2=true, DisplayMode.Disabled, DisplayMode.Edit)

 

 
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    Hi @BennyCruger ,

    Do you mean when it is set to true or when you return to the screen. 

    DisableToggle.gif

    If you want to do it straight away, put this code (replace with your name) on the DisplayMode of the toggle itself

     

    If(
     YourToggleName.Value,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    If you want it afterwards, let me know as this is a bit more involved.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • BennyCruger Profile Picture
    19 on at

    Thanks i forgot the .value.....

  • BennyCruger Profile Picture
    19 on at

    @WarrenBelz 

     

    Could you give it to me after the submit has happened?

  • Verified answer
    WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    OK @BennyCruger ,

    You need a variable here to trigger it - I will use vDisable - call it whatever you want.

    On the DisplayMode of the toggle

    If(
     vDisable && YourToggleName.Value=true,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    On the OnVisible of the Screen

    UpdateContext({vDisable:YourToggleName.Value})

    This sets the Variable to the current value of the toggle - so if the toggle is true, it will immediately disable. If it is false, it will stay enabled. When you set the toggle the first time, vDisable will be false, so it can stay enabled until the screen is reentered.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • BennyCruger Profile Picture
    19 on at

    @WarrenBelz 

     

    Thanks a million Warren!!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz 

    I'm a newbie.

    I dont know how to create variable here.

    Can you help me with this?

     

    Thank you!

  • WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    @dtd95 ,
    As per the second piece of code in my post

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz 

    Thank you for the reply.

    By the way, how to do it with your code in case of having four toggle button.

    Please help me!

    キャプチャ.PNG

     

  • WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    @dtd95 ,

    It would be a combination of and /or depending on what rules you wanted to implement.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz 

    Actually, once the approver turns on the approval_check button and saves it, it will not be able to edit it next time. I'd like the other buttons to be the same.

    Approver1_Check toglle:  DataCardValue8

    Approver2_Check toglle:  DataCardValue10

    Approver3_Check toglle:  DataCardValue12

    Approver4_Check toglle:  DataCardValue14

    Please help me with this.

    Thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard