SOLVED

Re: Form Pre-Fill Stops Working When Using This Custom Code

Go to solution
Tom_Kerlin2
Level 8

Form Pre-Fill Stops Working When Using This Custom Code

Hi all,

Whenever I use the following code (in orange) on one of my forms I notice that the form will not pre-fill even when the form pre-fill functionality is enabled.

.mktoForm input[type=text],

.mktoForm input[type=url],

.mktoForm input[type=tel],

.mktoForm input[type=email],

.mktoForm input[type=number],

.mktoForm input[type=date],

.mktoForm select.mktoField,

.mktoForm textarea.mktoField{

  border-radius: 6px !important;

  border: .5px solid #414141 !important;

  height: 30px !important;

}

Has this happened to anybody before? I appreciate any feedback.

Thanks,

Tom

Tom Kerlin
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Pre-Fill Stops Working When Using This Custom Code

Make sure you have PreFill enabled ​at the LP level.

View solution in original post

8 REPLIES 8
Josh_Hill13
Level 10 - Champion Alumni

Re: Form Pre-Fill Stops Working When Using This Custom Code

what does this code do? What do you want it to do?

Anytime you mess with the base functionality, you may need to custom rebuild the Form.

Are you pasting this into the Form's CSS box or on a page?

Tom_Kerlin2
Level 8

Re: Form Pre-Fill Stops Working When Using This Custom Code

I'm pasting this code into the Form's CSS box.

This code will round out the corners of the input fields and add a charcoal border like so:

pastedImage_0.png

When I remove this code and test on another form, the form pre-fill functionality works fine, but then the fields will default back to initial display setting:

pastedImage_1.png

Tom Kerlin
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Pre-Fill Stops Working When Using This Custom Code

CSS has no impact on PreFill: something else is happening here. Please link to working and non-working pages.

Tom_Kerlin2
Level 8

Re: Form Pre-Fill Stops Working When Using This Custom Code

You're right, I tested original form on another page (https://info.dh.com/NewCo-Launch-Test_LP-Test-Prefill-2.html ) and form pre-fill seems to be working fine.

Here is link to page where it's not working: https://info.dh.com/WBN-2017-08-02-FIN-CSH-Transitioning-to-Cloud-Security-Registration.html

Tom Kerlin
Josh_Hill13
Level 10 - Champion Alumni

Re: Form Pre-Fill Stops Working When Using This Custom Code

is there other code on the second page?

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Pre-Fill Stops Working When Using This Custom Code

Make sure you have PreFill enabled ​at the LP level.

Tom_Kerlin2
Level 8

Re: Form Pre-Fill Stops Working When Using This Custom Code

Thanks Sanford. I think I figured it out. FYI - Form PreFill is enabled when I click on Landing Pages Tab in Admin.

However, in the landing page editor, I clicked on Edit Form Settings and noticed that Form PreFill was left unchecked. I checked it off and now it's working fine (screenshot is below).

pastedImage_0.png

pastedImage_1.png

Is this what it means to enable PreFill at the LP level?

Tom Kerlin
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Pre-Fill Stops Working When Using This Custom Code

Yep.