Put a form on an existing page
Five minutes. Every form already has a page of its own, generated when you save it. This is for when you want it somewhere else as well - halfway down the events page, in the sidebar of a post, inside a landing page you have already built.
The quick way: the block
- Edit the page or post in the block editor.
- Add the LocalForm block.
- Pick the form from the dropdown.
- Update the page.
The editor shows a placeholder; the published page shows the real form.
The shortcode
For a page builder, a widget area, or a template that has no block editor:
[localform id="123"]
[localform slug="my-event"]
The ID is in the form's edit-screen URL; the slug is the last part of its own page's address. The slug is the friendlier of the two, and it survives a database migration - but it changes if you rename the form's address, so an ID is safer on a form other people edit.
Check it before you announce it
An embedded form behaves exactly like the generated page: same fields, same styling, same AJAX submit, same registration limits.
- A draft form is invisible to visitors, but administrators see it with a draft notice. That is how you preview an embed before publishing.
- Styles and scripts only load on pages that actually contain a form, so embedding one costs your other pages nothing.
- Submitting shows the thank-you message in place, on the page where the form is embedded.
Making it fit the page
The generated page uses LocalForm's fullscreen template, which is rarely what you want inside your own layout. Turn on Use site theme styling in the form's settings and it renders with your theme's page template instead.
Colours, fonts and background come from the Design panel (the palette icon in the builder's top bar), which overrides the site-wide defaults under LocalForm → Settings → Appearance. Worth a look once the form is sitting in its real surroundings - see design, tags & anti-spam.
Where the form's own page lives
Saving a form creates a page for it under /forms/ by default: /forms/my-event/. Developers can move that with the localform_forms_base_slug filter, returning '' to put form pages at the site root.
A form page showing "not found" is nearly always permalinks. Go to Settings → Permalinks, pick anything other than "Plain", and save.
Sending a link that already knows the answer
With Pro, any question can be filled in from the URL - so a link in a newsletter can arrive with the recipient's email already in the form. Turn on Prefill from URL on the question, then use Copy prefill link in the builder to get the query string. See prefill from URL.