How to prefill fields in WordPress forms?

When embedding a form on a WordPress page or post, the code retrieved from the Get Code & PublishWordPress section normally looks like this:

[123-contact-form i507842]

In order to prefill form fields you need to change this code in the following way (in one line):

[123-contact-form i507842 control3592242-1=John&control3592242-2=Doe&
91577=This is a test message.]
control3592242-1, control3592242-2, control3591576 and control3591576 are the name attributes of form fields. They can be retrieved by inspecting the code of your form with a browser inspection tool.

John, Doe, and This is a test message. are the prefilled values assigned to the fields above.

Name attributes and value are connected through the operator &.

This example has the following result:

Leave a Reply

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