Send Contact Form 7 Visitors to a Thank-You Page with AI
Point a Contact Form 7 form at a thank-you page you can track as a lead, with the page written and published first.
Prerequisites
A site connected to WPVibe running Contact Form 7 and the free Redirection for Contact Form 7 plugin, 3.2.17 or newer (tested on 3.2.17 with Contact Form 7 6.2.5), on WordPress 6.9 or newer, with an administrator account.
My site uses Contact Form 7 and Redirection for Contact Form 7. After someone sends [the form's title, for example Contact form 1], send them to a thank-you page called [the page title, for example Thanks for your message] that says [what happens next, for example we reply within one working day, and a link to our FAQ].
1. Run discover_abilities with category cf7-actions. If it finds nothing, stop and tell me to install or update the free Redirection for Contact Form 7 plugin (3.2.17 or newer) alongside Contact Form 7, on WordPress 6.9 or newer.
2. Run rest_api GET /contact-form-7/v1/contact-forms and find the form I named by its title. If several match, show me their titles and ids and ask which one; if none match, show me the list and ask. Call its id FORM_ID.
3. Run cf7-actions/list-actions with form_id FORM_ID. Tell me every action the form has, in order, and whether each is on. If it already has an action of type redirect, show me where it sends people (page_id, or external_url when use_external_url is on) and ask whether to change that one instead of adding another: a form should have one redirect. If I say yes, use its id as ACTION_ID from here on. If I say no, tell me the old redirect has to be switched off, because two redirects on one form send visitors to either page; note its id as OLD_ID for step 6. If it has more than one redirect, list them all, ask which one to keep or whether to add a new one, and note every other redirect that is on as OLD_ID.
4. Run rest_api GET /wp/v2/pages with search set to my page title and status any. If a page with that title exists, show it and ask whether to use it; if I say yes, use its id as PAGE_ID and show me its preview link instead of creating one. Otherwise create the thank-you page with rest_api_write POST /wp/v2/pages: title as I gave it, status draft, content in short paragraph blocks in my words. Call its id PAGE_ID. Show me its preview link and wait for my yes or my changes.
5. Run cf7-actions/upsert-action with form_id FORM_ID, dry_run true, status on, config {"page_id": "PAGE_ID", "use_external_url": false, "http_build_query": false, "http_build_query_selectively": false, "open_in_new_tab": false}, and either action_id ACTION_ID or type redirect with title Thank-you page. Passing the form's fields to the page is turned off on purpose: it would send names and emails along to the page, where analytics tools record them. Opening in a new tab is turned off because browsers often block it. Leave every other setting as it is. If valid is false, show me the errors and stop. Otherwise show me what it would save, that page PAGE_ID will be published, and which redirects (OLD_ID) will be switched off, and tell me it applies to the live form at once. Wait for my yes.
6. On my yes, publish the page first with rest_api_write POST /wp/v2/pages/PAGE_ID with status publish only: a redirect to a draft page sends visitors to a page they can't open. Then run the same cf7-actions/upsert-action with dry_run false. For each OLD_ID, run cf7-actions/upsert-action with form_id FORM_ID, action_id OLD_ID and status off. Run cf7-actions/list-actions with form_id FORM_ID and show me the redirect action, its page_id and its status.
7. Ask me to fill in the form once on my site and check I land on the thank-you page. If the page is in my site's menu (some themes list every published page when no menu or no menu pages are chosen), tell me how to take it out. To undo it later, run cf7-actions/upsert-action with form_id FORM_ID, the redirect's action_id and status off, and, if this recipe created the page, offer to set it back to draft.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Send Contact Form 7 Visitors to a Thank-You Page with AI” recipe from the WPVibe cookbook on my connected site.
After someone sends a Contact Form 7 form, they see one line under the button and nothing else. A thank-you page does more: it says what happens next, links to what they might need, and gives your analytics or ad platform a page to count as a lead. Setting it up means finding the right action, the right page and the right field in a plugin screen most people open once.
The AI finds your form, checks whether it already sends people somewhere, and writes the thank-you page as a draft in your words. It shows you the exact redirect before saving it, publishes the page only on your yes, and then points the form at it, so nobody is ever sent to a page they can’t open.
Name the form and say what the page should tell people. Fill the form in once yourself afterwards to see it work. The redirect is saved to the live form straight away, and it happens only after a submission goes through without errors. If you count the page’s visits as leads, keep it out of your menus, and out of search results with your SEO plugin’s noindex setting (here it is for Yoast SEO); this recipe tracks them with PixelYourSite. To keep a copy of each submission too, use this one.
Outcome
Visitors who send the form land on your published thank-you page.