How do I get my form fields to pre-fill customer data previously entered?

We will assume you are already merging info onto other parts of the page so this will strictly talk about merging into the form fields themselves.

For this to happen, you'll need the value attribute set in the code of the form field. This is easier than it sounds. It is basically this:

value="Cool Info"

So in your form code, find the field where you want to pre-fill info. Let's say it's the customer's first name. It should look like this:

 

<div class="mc-webform-item">
<label class="mc-field-caption">First Name</label>
<div class="mc-field-item">
<input type="text" name="mc-firstname" />
</div>
</div>

 

We simply add the value attribute on the "input type" line:

 

<div class="mc-webform-item">
<label class="mc-field-caption">First Name</label>
<div class="mc-field-item">
<input type="text" value="Cool Info" name="mc-firstname" />
</div>
</div>

 

That would literally pre-fill the name field with the words "Cool Info"

If you want that to be the person's firstname, you'll need to replace "Cool Info" with the AS merge code (complete guide here)

So if we were using WordPress, our value attribute would look like this:

value="[as what="firstname"]"

(note that there are two sets of quotes, both are needed)

So the final form field code would look like this after the simple modification:

<div class="mc-webform-item">
<label class="mc-field-caption">First Name</label>
<div class="mc-field-item">
<input type="text" value="[as what="firstname"]" name="mc-firstname" />
</div>
</div>

 

0 Comments

Please sign in to leave a comment.