How do I create an enquiry management dashboard?
Last checked 31 Aug 2026
Short answer
Ask Lovable to build an admin-only page that lists submissions from your database table, with search, status filters and the ability to mark enquiries as handled — protected by authentication and row-level security.
Start from the data you already have
If form submissions are already saved to a table (see how do I save form submissions to a database), a dashboard is a read/update view on top of it. Describe what you want to see and do:
Build an admin page at /admin/enquiries that lists all rows from the
enquiriestable, newest first. Show name, email, message and submission date. Add a status column (New, In progress, Done) that I can change from a dropdown, and a search box that filters by name or email.
Lock it down properly
This page should never be publicly reachable. Two layers matter:
- Authentication: require the admin to be logged in.
- Authorisation: check the logged-in user actually has an admin role, stored in a separate
user_rolestable — never a column on the user's profile row.
Only allow users with an "admin" role (checked against the user_roles table) to view or edit /admin/enquiries. Redirect everyone else to the home page.
Useful extras once the basics work
- Pagination once the table has more than a page's worth of rows
- Export to CSV for offline use
- Email or in-app notification when status changes
- A detail view for a single enquiry with full message text
What usually goes wrong
- No RLS on the underlying table: even with a login-gated page, an unprotected table can still be queried directly. RLS on the database is the real security boundary, not just the front-end route guard.
- Role stored on the profile table: this is easy to escalate (a user editing their own row) — always use a dedicated
user_rolestable instead. - Forgetting realtime updates: without asking for it, new enquiries won't appear until the page is refreshed; ask for a manual refresh button at minimum.
For a dashboard that needs more than basic CRUD (bulk actions, reporting, integrations), it's a reasonable point to hand the build to PromptSites.com for a proper review.
Sources
Was this answer helpful?
Related questions
- AnswerWhere do Lovable form submissions go?Nowhere, by default — a form only exists on the front end until you connect a destination: a database table (Lovable Cloud/Supabase) and/or an outgoing email via an integration like Resend.
- AnswerHow do I email form submissions to myself?Connect an email integration (Resend is the standard option), then ask Lovable to trigger a server-side function that emails you the form data whenever it's submitted.
- AnswerHow do I save form submissions to a database?Connect Lovable Cloud (or your own Supabase project), then ask Lovable to create a table for submissions and wire the form's submit handler to insert a row into it, with row-level security limiting who can read the data.
- AnswerHow do I upload files through a form?Use Lovable Cloud's (or Supabase's) storage buckets: ask Lovable to add a file input, restrict file type and size, and upload to a storage bucket with access rules controlling who can read the file later.