cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ouryuusama
Frequent Visitor

Toggle Button

Hello! I am relatively new to Power Apps and I would like some help. I am making something like "Terms and Conditions" where the user has to toggle to "Yes" which means they have read the "Terms and Conditions" before they can submit the form. Which means the Toggle value has to be "Yes" in order for them to be able to submit the form.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ouryuusama ,

In SharePointIntegration in the OnSave function

 

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.

Visit my blog Practical Power Apps

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Ouryuusama ,

In your code submitting the form

If(
   !YourToggleName.Value,
   Notify("You need to answer yes to Terms and conditions",Error),
   SubmitForm(YourFormName)
)

 

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.

Visit my blog Practical Power Apps

eka24
Super User
Super User

In the OnSelect Property of the SubmitButton:

If(Toggle1.Value,SubmitForm(FormName),Notify("Turn the Toggle to Yes before you can save"))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Consider Checking My Youtube Channel

Ouryuusama
Frequent Visitor

Thank you very much. Where should I input this code if I don't have a physical submit button. The submit button I am using is the default "save button" that appears on Sharepoint List (does not appear inside Power Apps form).

Hi @Ouryuusama ,

On that button - add the save code after the check

As I have said, there is no save button inside the Canvas. The button appears only in Sharepoint List when I make new item for the List. Please see image below.キャプチャ.PNG

Hi @Ouryuusama ,

In SharePointIntegration in the OnSave function

 

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,807)