Generic selectors
Exact matches only
Search in title
Search in content

How to prefill fields when embedding a form?

If you want to prefill form fields when embedding your form on a webpage, you can do that by tweaking and using the code provided below. We’ll see in a second how to use it. First, let’s mention that, when sharing the form link or publishing the form on WordPress, the procedure is different.
Read more about how to prefill form fields on WordPress.
Read more about how to prefill form fields when sharing the form link.
Back to the code needed when embedding the form on a regular web page, what you need to do is copy the following code, paste it in your web page, and make the adjustments indicated in below the code.

prefill embedded form

There are three areas in which you need to focus:

    • The function data-custom-vars is not added by default in the javascript code you have obtained in Publish – Embed Code. Therefore, you’ll need to add it manually to your code, followed by the ids of your form fields you want prefilled with the desired values.
    • Following, control3333333-1=John means that the field with the ID control3333333-1 has John as the prefilled value. The field with the name control3333333-2 is prefilled with the value Doe, and so on. Field – value pairs are linked through the operator &. To identify form field names, inspect the form code using a browser inspection tool.

When the form field is split into several subfields, you need to add its number after the ID . For example, the Name field contains a First Name and a Last Name. These two have separate IDs: First Name – control33333333-1, Last Name – control33333333-2.

This is the extra part which needs to be added to the embed code. Replace the control ID with your own field’s ID.


prefill embedded form


  1. Hi! I simply wish to give you a big thumbs up for your great info you have got here on this post. I will be returning to your site for more soon.

  2. I needed to thank you for this good read!! I certainly enjoyed every bit of it. I’ve got you book marked to check out new stuff you post…

Leave a Reply

Your email address will not be published. Required fields are marked *

Frequently Asked Questions

Here is a list of the most frequently asked questions. For more FAQs, please browse through the FAQs page.

Is this service free?
Yes, we offer a free form builder service. Just sign up to the Basic plan and you are all set. This plan is forever free, but you are limited with a few features only, such as 5 forms per account, 100 submissions per month and you have to keep the backlink to 123FormBuilder on your forms. Check out our features matrix for more information.
How many forms can I create?
It depends on the service plan you are on. Higher service plans enable more features, including more web forms for your account. If you need more forms, go to the My Account section of your account and click the upgrade button. To create an unlimited number of forms, either upgrade to the Platinum service plan or higher. Consult our features matrix for more information.
How can I publish my forms?
You can publish your forms in many ways, by using their direct URL or HTML link, embedding them with a JavaScript code, Inline HTML or iFrame, using the Facebook app or the WordPress plugin, using popups, the Blogger code snippet and many more. Once you have created and customized your form, go to the Publish section to complete your work. Read more in our documentation.
How do I change my form design?
You can change the design of your form in the Themes section, which is located in your form settings. We offer a set of more than 30 predefined form themes for your forms, but you can also create your own from scratch. You can customize the submit button, the logo and more. To apply your own stylesheets, all forms come with a custom CSS editor.

Can't find what you're looking for?