PadCodedocs

Cookbook

Short recipes for common app features, each built step by step the way a real PadCode app does it.

Each recipe builds one feature you'll want in your own apps, step by step, and explains why it works. They follow how PadCode's own apps do it: Invoice Snap, Hydrate!, Focus Timer Pro, Sign-in Starter, Tip Jar and Rent Splitter, which are in Templates and the Marketplace. Each recipe builds the same thing from a blank app, and you can open the finished app to see how it's made.

New to PadCode? Start with Your first app, then come back here.

#Recipes

RecipeWhat you'll build
A list you can add toInvoice line items: add a line from what's typed, remove one, and total them with sum(…).
Remember dataA water tracker that keeps its count after the app closes and starts over each day.
A timerA 25-minute focus timer that counts down every second and plays a sound at the end.
Sign in with an APIA sign-in screen that sends a username and password to an API, keeps the token and loads a profile.
A tip calculatorA slider, a stepper and formulas that split a bill, written as money with currency(…).
A form that checks what's typedA sign-up form whose fields say what's wrong as people type, and whose button checks again.

#Before you start

Every recipe uses the same few moves:

  • Variables live in the Library's Data & Logic tab: Add variable, pick a type, then tap the name to rename it. See Variables.
  • Linking: a control's Text, Value or Is On menu picks the variable it changes. Any other setting links to a variable or a formula with the ⚡︎ button. See Connecting views to data.
  • Text with values: in most text settings, {braces} hold a formula, like {currency(total)}. See Text with values.
  • Steps go in a view's Actions tab: pick when they run, then Add action. See How steps run.
  • Trying it: Preview runs the app. If it won't open, Issues lists what to fix.
  • Pro components: most recipes use a component or two beyond the Free plan's 19, like a Slider, Stepper, Labeled Value, Progress Bar, Password Field or Web Image. On Free those tiles have a PRO badge. See Plans and billing.

#See also