Title: Embed form as script
Last modified: January 21, 2022

---

# Embed form as script

 *  Resolved [victoriei101](https://wordpress.org/support/users/victoriei101/)
 * (@victoriei101)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/)
 * Hello, can you please tell me if it’s possible to embed a form in another website
   as a script and not as an iframe?
    I want to give the visitors the option to 
   embed a form (which has a backlink) on their website, but not as an iframe, for
   SEO purposes.
 * Like this example here:
    `<script src="https://estate.realsoftinvest.ro/api/taxe_notariale/
   widget?v=1"></script>`
 * Thank you

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15275807)
 * Hello [@victoriei101](https://wordpress.org/support/users/victoriei101/)
 * You can implement a script to generate the iframe by coding. For example, assuming
   the URL to the form is: [https://www.yourwebsite.com/?cff-form=1](https://www.yourwebsite.com/?cff-form=1)
 * You can implement the script similar to:
 *     ```
       var iframe_tag = document.createElement("iframe");
       iframe_tag.setAttribute("src", "https://www.yourwebsite.com/?cff-form=1");
       iframe_tag.style.width = "100%";
       iframe_tag.style.height = "480px";
       document.body.appendChild(iframe_tag);
       ```
   
 * Note my code is only an example to illustrate the process.
 * Best regards.
 *  Thread Starter [victoriei101](https://wordpress.org/support/users/victoriei101/)
 * (@victoriei101)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15276854)
 * I embedded the above code and unfortunately, it doesn’t work. Thanks anyway
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15276863)
 * Hello [@victoriei101](https://wordpress.org/support/users/victoriei101/)
 * The code I sent you previously is only an example. Please, send me your definitive
   code.
 * Best regards.
 *  Thread Starter [victoriei101](https://wordpress.org/support/users/victoriei101/)
 * (@victoriei101)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15283523)
 * The code below (simple script, no iframe), when embedded in any site, displays
   a calculator:
    `<script src="https://estate.realsoftinvest.ro/api/taxe_notariale/
   widget?v=1"></script>`
 * I want to have a similar script, using CFF, that can be embedded without iframe,
   exactly like the code example above.
    Something like this: `<script src="https://
   www.yourwebsite.com/widget/?cff-form=1""></script>` Thanks
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15285055)
 * Hello [@victoriei101](https://wordpress.org/support/users/victoriei101/)
 * No, sorry, that is not possible because the URL you are referring to does not
   generate a javascript code block.
 * The alternative would be to create a JS file with a code similar to the script
   I sent you in a previous entry. This code would generate the iFrame tag, loading
   the form into it.
 * Best regards.
 *  Thread Starter [victoriei101](https://wordpress.org/support/users/victoriei101/)
 * (@victoriei101)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15292883)
 * Hi, I’ve added your code
 *     ```
       var iframe_tag = document.createElement("iframe");
       iframe_tag.setAttribute("src", "https://ioio.ro/?cff-form=5");
       iframe_tag.style.width = "100%";
       iframe_tag.style.height = "480px";
       document.body.appendChild(iframe_tag);
       ```
   
 * here: [https://ioio.ro/cff](https://ioio.ro/cff)
 * and added this script <script src=”[https://ioio.ro/cff”></script&gt](https://ioio.ro/cff”></script&gt);
   
   on this page [https://ioio.ro/test/](https://ioio.ro/test/)
 * but the form is being displayed only at the bottom of the page, even while the
   script is at the top of the page, right above the headline.
    Please see image:
   [https://ibb.co/b7f94rt](https://ibb.co/b7f94rt)
 * How can I display the form exactly where the script is being added?
    Thanks
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15294763)
 * Hello [@victoriei101](https://wordpress.org/support/users/victoriei101/)
 * In the code I sent you as a reference, I used `document.body.appendChild(iframe_tag);`
 * You should replace it with the code to display the iframe tag in another place.
 * I’m sorry, but the support service does not cover the implementation of the users’
   project. If you need me to edit your code, you can contact me through the plugin
   website:
 * [https://cff.dwbooster.com/contact-us](https://cff.dwbooster.com/contact-us)
 * Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Embed form as script’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [embed](https://wordpress.org/support/topic-tag/embed/)

 * 7 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/embed-form-as-script/#post-15294763)
 * Status: resolved