Close a Form on a Date or After Enough Entries with SureForms and AI
Close a SureForms form at a date and time or after a number of entries, with your own closed message.
Prerequisites
A site connected to WPVibe running SureForms 2.12.9 or newer (tested on the free 2.12.9) on WordPress 6.9 or newer, with an administrator account. SureForms' AI access must be on: SureForms > Settings > MCP > Enable Abilities (the tab first asks you to install the free MCP Adapter plugin). This recipe changes forms, so Enable Edit Abilities on the same tab must be on too.
My site runs SureForms. Close my form [form name] [on a date and time, for example 31 Dec 2026 at 11:59 PM, or after a number of entries, for example 40]. Visitors should see this instead of the form: [message].
1. Run get_ability_info for each SureForms ability this uses: sureforms/list-forms, sureforms/get-form-stats and sureforms/update-form. If one is not found, SureForms is keeping it off: tell me to update SureForms if it is older than 2.12.9, then go to SureForms > Settings > MCP (install and activate the MCP Adapter plugin if the tab asks for it) and switch on Enable Abilities and Enable Edit Abilities (I can switch them off again afterwards), and stop. MESSAGE below means the message from my request above.
2. Find the form with sureforms/list-forms, status publish, per_page 100 and search set to its name (ask me if more than one matches). Run sureforms/get-form-stats with its id and note total_entries (trash not counted). Read its current closing settings with rest_api GET /wp/v2/sureforms_form/FORM_ID with context edit and _fields id,meta._srfm_form_restriction (a JSON string).
3. Plan the change. For an entry limit: formRestriction {"status": true, "maxEntries": N, "message": "MESSAGE"}. N must be at least 1: with the limit on, 0 closes the form at once. If total_entries is already N or more, the form closes at once; tell me. For a closing date: formRestriction {"schedulingStatus": true, "date": "YYYY-MM-DD", "hours": "HH", "minutes": "MM", "meridiem": "AM or PM", "schedulingEndedMessage": "MESSAGE"}, in 12-hour time in the site's time zone (midnight at the end of a day is 11:59 PM that day; 12:00 AM is the start of the day). If the closing settings have a startDate later than now, tell me: switching the closing date on also keeps the form closed until that start date. Show me the current settings, the change and when the form will close, and wait for my yes.
4. On my yes, run sureforms/update-form with form_id and formMetaData {"formRestriction": ...} from step 3. Settings you leave out stay as they are.
5. Read the closing settings back as in step 2 and show me. If the form should still be open now, ask me to load the page it is on and check the form shows. To reopen it later: status false switches the entry limit off, and schedulingStatus false switches the closing date off.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Close a Form on a Date or After Enough Entries with SureForms and AI” recipe from the WPVibe cookbook on my connected site.
Some forms should stop taking entries: the event is full, the season is booked, the offer ended on Friday. Left open, the form keeps collecting entries you have to turn down one by one. SureForms can close a form on its own, but the settings sit in each form’s options.
Tell the AI which form, and either the date and time it should close or how many entries it should take. It shows you the current count and the exact setting before changing anything, sets the message visitors see instead of the form, and asks you to check the form still shows if it should be open now. Nothing else on the form changes.
Times follow your site’s time zone. Entries in SureForms’ trash don’t count toward a limit, so trashing spam frees a place. To reopen the form, ask the AI to switch the limit or the closing date off.
Outcome
The form closes on the date or at the entry count you set and shows your message instead.