top of page

A Non-Coder's Guide to Coding in a Knack App

Updated: May 12



Simple explanation of how to do basic coding in a Knack app.


"stock code" from Knack: https://www.knack.com/developer-docum...





Hey there, it's Dave Parish from Knack Builders, back with another video to shed light on something that might seem daunting to non-coders: coding in a Knack app. Now, before you close this tab thinking, "But I thought Knack was a no-code platform," let me tell you, it's simpler than you might think.


Let me give you a bit of background about myself. I'm not a coder. Nope, not even close. My background is in history and business operations management, with a sprinkle of finance. So, when clients come to me, they're often looking for solutions without the complexity of custom code. And you know what? It's entirely doable.


Now, let's dive into the meat of it. How does a non-coder like me use code in a Knack app? Well, it starts with knowing where to look. One handy resource is Knack's development documentation. A quick Google search for "Knack HQ custom code" will lead you there. Here, you'll find examples and snippets for JavaScript and CSS, which are the two main types of code you'll likely encounter.


But here's the thing: you don't need to reinvent the wheel. Most of the time, I'm just adapting existing code snippets to suit my needs. Knack provides a treasure trove of examples for common functionalities like modifying form behavior or styling elements. It's like having a box of Legos where you can mix and match pieces to build what you want.

Let's walk through a practical example. Say you want to tweak the behavior of modal pop-ups in your app. By default, when you click off to the side, the modal disappears, potentially losing any entered data. Not ideal, right? Well, with a bit of code magic, you can change that.


Here's what you do:

  1. Go to your app settings and find the "API & Code" section.

  2. Copy and paste the code snippet provided by Knack for modifying modal behavior.

  3. Customize the snippet if needed, specifying whether you want it to apply to the entire app or specific scenes.

  4. Save your changes and voila! Your modal pop-ups now behave just the way you want them to.


But coding in Knack isn't just about tweaking behaviors. It's also about styling your app to perfection. Want all your form instructions to appear in italics? Easy. Need to adjust font sizes or hide certain elements? Piece of cake.


And the best part? You don't have to go it alone. Knack's community forums are a goldmine of knowledge, where you can seek advice, share tips, and even find ready-made solutions to common challenges. Plus, platforms like Codecademy offer free courses for beginners looking to level up their coding skills.


So, to all the non-coders out there, don't let the fear of code hold you back. With Knack, you have the power to create custom solutions without writing a single line of code. Embrace it, explore it, and see where it takes you. Who knows, you might just surprise yourself with what you can achieve.


Thanks for tuning in, and until next time, happy Knacking!

59 views0 comments

Comments


bottom of page