Skip to content
Lovable Academy
4

The submission form

If you haven't already, flip to Plan mode and plan this chunk the way we did in Lesson 2. Something like: "I want to add a submission form to Upvote. When the user clicks 'Submit Idea,' a modal opens with fields for title, description, and category. The new request should appear at the top of the list when submitted." Review the plan, approve it, and let Lovable build.

Once it's done, click the "Submit Idea" button. A modal should appear with fields for title, description, and category, and a submit button at the bottom.

Fill it out. Give it a real title, something you'd actually want in a product. "Keyboard shortcuts for power users." Write a real description, pick a category, then submit.

The modal closes. Your request appears in the list.

Now try to break it. Try submitting with an empty title, or type something and cancel to see if the modal resets properly. If Lovable anticipated the edge case, great. If not, write a prompt to fix it.

This is a pattern worth naming: build, break, fix. Build the feature, immediately try to break it, then fix what you find. It's faster than trying to specify every edge case in your first prompt, and it catches things you wouldn't have thought to include. You'll use this pattern for the rest of the course and every project after.

Submit a few more ideas in different categories. Click between the sidebar filters and try the sort dropdown. If they're already working, filtering by category and sorting by property, great. The skeleton prompt got ahead of you. If not, tell Lovable to wire them up:

PROMPT

Make the sidebar category filters functional. Clicking "UI/UX" shows only UI/UX requests. Clicking "All" shows everything. Highlight the active filter so it's visually obvious. Also wire up the sort dropdown: "Most Voted" puts the highest-voted requests first, "Newest" puts the latest first, "Oldest" puts the earliest first.

Either way, click between filters and sort a few times. The page feels like a product now.

Here's the concept underneath all of this: prompts are specifications, not wishes. "Add a form" is a wish. It's vague and open to interpretation. What we wrote, with the fields, the modal behavior, what happens on submit, how validation works, is a specification. The gap between those two is the gap between frustration and results. Lovable builds exactly what you describe, which means the quality of your description is the quality of your app.