Published Contact page with guest Send message form fields
Guest contact form

Appifio Creator · Lesson F02 · Intermediate

Contact / signup form
saved to Aura Storage (no CMS required)

How guests submit a form without logging in - data lands in a list you can review later, even before you open Aura CMS.

Learning goals: Understand appendData, why guest forms always use indexed lists, how to review submissions, and what "Try again later" means when someone submits too fast.

Reading time: about 14-16 minutes

Prerequisites: Backend tab overview (F01).

Previous → next: F01 → F02 → F03 / G03

UI labels: Backend tab · View backend database content · Save changes · Changes / Current

1. Guest form flow

1. Guest fills the form (not logged in)
→ name, email, message…
2. Guest clicks Submit on the page
→ page calls appendData('contacts.json', { name, email, message })
3. Backend handles it
→ auto id, created_at, created_by_ip
→ first time: creates the index + auto-splits when the list grows
4. Guest sees
→ success message - or "Try again later" if they submit too often
5. You review
→ Backend tab → "View backend database content"
→ or "Contacts" in Aura CMS (after opening /your-link-name/cms)

2. Glossary (3 columns)

TermMeaningWhere in the UI
GuestVisitor who isn’t logged in - may only append new rows to a listPublic form on the site
appendDataAPI that adds one new record - the only guest mutation allowed without loginAPI name when asking AI to write code
Indexed listMany records with ids - contacts, blog, ordersBackend table after data exists
created_by_ipSender IP - server attaches it; the form can’t fake itContact detail columns (CMS)
Try again laterAnti-spam message when submits come too fast - not a broken systemOn the form after rapid Submit clicks
readListAPI to read the full list - logged-in admin onlyAdmin page AI builds (F03)

3. Steps - build a contact form (via AI)

  1. Step 1 - Check Backend: open Backend, confirm a valid API key and Advanced if you’ll use CMS later (F01).
  2. Step 2 - Ask AI: “Create a contact form with name, email, message; on submit save to contacts.json with appendData, no login. Show success or Try again later when rate-limited.”
  3. Step 3 - Test the draft: View & editChanges → fill the form → Submit → read the on-screen message.
  4. Step 4 - Confirm data: BackendView backend database content → find a key near contacts.json.
  5. Step 5 - Publish: when happy → toolbar Save changes → test again on the live link.
  6. Step 6 - (Optional) Admin page: ask AI for a list page with readList + admin login (F03). Or wait for Aura CMS → Contacts nav (G03).

4. Why always appendData - not writeFile - for lists

Backend database table listing contacts.json among storage keys
Review rows in Backend

appendData is like dropping a letter into a mailbox - each person adds one, nobody overwrites another’s. writeFile of a whole array is like erasing the notebook and rewriting - two people submitting at once can lose data.

Right (indexed)Wrong (breaks lists)
appendData('contacts.json', {name, email, message})writeFile('contacts.json', JSON.stringify([...]))
readList('contacts.json') for admin viewRead/merge the whole file and rewrite on every submit

5. Compared with other tools

  • Google Forms / Typeform: form lives off-site; here the form sits on your landing and data lands in your app store.
  • WordPress Contact Form 7: often email-only; Aura Storage + CMS lets you view/delete messages in a panel.
  • Formspree: data lives on a third party; here it stays in app storage.

6. Technical limits

You can

  • Public forms without login
  • Auto id, timestamp, sender IP
  • Review in Backend or CMS Contacts
  • Email alerts via Backend Function + Secrets (F04)

Limits

  • Guests can’t edit/delete others’ rows
  • Too fast → Try again later (anti-spam)
  • No built-in CAPTCHA - ask AI to add if needed
  • Security enforce may disable guest append (G05)

7. Guest form security

  • Guests may only appendData - not updateData, delete files, or read others’ lists via public API.
  • "Try again later" appears when the same IP submits too often - wait a few minutes; don’t spam Submit.
  • Ask AI for friendly on-form errors (try/catch) - so rate limits don’t look like a broken site.
  • With CMS security controls on, check Contacts’ "Who can create?" still allows guests (G05).

8. Common issues

SituationFix
Submit works but no Backend dataConfirm Save changes; refresh the DB table; test on live, not only Changes
Form says “Try again later”Anti-spam rate limit - wait 2-5 minutes; not a system outage
AI used writeFile for the listAsk it to switch to appendData/readList (F05)
Works on Changes, fails on liveCompare Current vs Changes; Save changes; check live API key

9. Tips

  • Use clear file names (contacts.json, registrations.json) - easier to find in Backend.
  • Test Desktop and Mobile (Canvas) before Save changes.
  • Need email on new contact → Backend Function (F04), not mail from the visitor’s browser.

10. Self-check

  1. Do you know why guest forms only use appendData?
  2. Can you review data in the Backend tab?
  3. Do you treat “Try again later” as anti-spam, not a broken site?
  4. Have you tested the form on live after Save changes?

Next lesson

F03 - Admin auth: login.json & roles

When only admins should see the contact list, learn login and the three roles.

Appifio Creator · User guide · F02