Can I publish forms as lightboxes on Joomla?
October 3, 2012
How to limit the number of times an option is selected?
October 15, 2012

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&control3591576=johndoe@company.com&control35
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, johndoe@company.com 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:

1 Comment

  1. […] more about how to prefill form fields on WordPress. Read more about how to prefill form fields when sharing the form […]

Leave a Reply

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