Prevent Modal Pop-ups from Closing with a Side Click in Knack

In Knack, if you have a modal pop-up window, and you click off to the side, the window will close and you will lose anything you have inputed. Here I show you how to prevent that using just a little bit of custom code. Link to custom code: https://drive.google.com/file/d/18wERFKtaDdB04oFBWCExRCTYR2C_mvMf


Interested in my Knack database services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdave


Get a free Knack trial account here: https://www.knack.com/r/you-tube


If you are a fan of building great apps with Knack, please click the Subscribe button to join my channel, and ring the bell to receive notices on all my new instructional videos. Thanks!




Full Transcript


Hello, Dave Parish here with Knack Builders.Again, I always ask this.If you like these videos, please like the video and subscribe to the YouTube site. But today's topic, let's get into it.Prevent modal, meaning mobile popups from closing with side.I'm going to show you what I mean by this.I use this in pretty much every app that I do.If you watch my videos, you knowI use mobile pop ups a lot.Here's what I'm talking about.Here the motor pop up.Now this has just a few pieces of information, but sometimes it's a big.Your user is filling out a lot of stuff and they can close the window here up top, but if they click off to the side, the motor pop up, closes and they'll lose anything they've put in there.If that happens, and it happens frequently, I'm going to show you how to prevent that from happening.It's really easy. This is going to be really short and I'll be right back. Thanks.Okay, I'm back and here's the deal on how to prevent mobile pop ups right here from closing often, accidentally.If you click off to the side, we accomplish this with just a little piece of code.I got this from Next documentation and steps they provide, but it's very useful.I've been using it for years.What you do, this is going to be JavaScript, if you know how to access the custom coded aspects of Mac.But I'll show you.If you copy this, I'll provide this in the description.You go to the app back, end up here next to the name of the thing.Go down to API, custom code.This one is JavaScript.And go here.You just going to paste it in.There it is.Save it.I'm going to go back here, refresh it so that code loads.There it is.Add bill.Now clicking off the side.It doesn't do it anymore, so people won't accidentally lose stuff they put in there. That's it.This is my shortest one.I'm pretty darn sure appreciate it. Thank you.

3 views0 comments

Recent Posts

See All