Install a form on WordPress and Elementor
Add the setup script once and point an existing Elementor button to your form.
Add the setup script
- In COSMY Forms, open Install for a published form and copy the Setup script.
- Use your site’s existing way of adding code to <head>. If Elementor → Custom Code is available, choose <head> and set the display conditions for the pages you need.
- Open the published website page and verify that cosmyforms.js loads once.
Link the form to an Elementor button
If WordPress removes the snippet when saving, ask the site administrator to check your permission to add HTML and JavaScript.
- In COSMY Forms, copy the link from Your own website button → Existing button.
- Edit the page in Elementor, select the Button widget, and paste the link with #cosmy-popup into the Link field. Turn off opening in a new tab in the link options.
- Update the page. Try the button on the live page on a phone and a computer, then send a test submission.
- For a floating control, configure it in COSMY Forms and add its button code with an HTML widget on the page or in a shared template.