SOLVED

Filling in field hidden by visibility rules on embedded forms

Go to solution
monkeyrench12
Level 2

Filling in field hidden by visibility rules on embedded forms

Hi everyone,

Hoping there is an easy solution to this. I'm using a global form embedded in several places on our website - I would like to be able to hide one of the fields on some of these pages and have it autofill to a certain value. I have tried hiding the field via visibility rules and then adding a hidden field in the embed code, but Marketo seems to ignore this (I presume because the field is actually there, just not shown).

 

I know I can just add the value after the form is filled in via a trigger in Marketo based on referrer, but would rather add it at form fill if possible.

Thanks!
Will


1 ACCEPTED SOLUTION

Accepted Solutions
Dave_Roberts
Level 10

Re: Filling in field hidden by visibility rules on embedded forms

 

@SanfordWhiteman describes a prefill solution on his blog here: https://blog.teknkl.com/pre-fill-any-site-any-form/ that should work to help you prefill fields on an embedded form which use visibility rules. It looks like there's some feedback in the comments at the bottom (attached below) that describe how this works with the visibility rules:

 


You could rerun the pre-fill in whenRendered — but make sure you only fill in the fields that haven’t been changed, or else you could be changing things the end user already modified.

 

Dave_Roberts_0-1677680854175.png

 

View solution in original post

4 REPLIES 4
Dave_Roberts
Level 10

Re: Filling in field hidden by visibility rules on embedded forms

 

@SanfordWhiteman describes a prefill solution on his blog here: https://blog.teknkl.com/pre-fill-any-site-any-form/ that should work to help you prefill fields on an embedded form which use visibility rules. It looks like there's some feedback in the comments at the bottom (attached below) that describe how this works with the visibility rules:

 


You could rerun the pre-fill in whenRendered — but make sure you only fill in the fields that haven’t been changed, or else you could be changing things the end user already modified.

 

Dave_Roberts_0-1677680854175.png

 

monkeyrench12
Level 2

Re: Filling in field hidden by visibility rules on embedded forms

Thank you Dave

SanfordWhiteman
Level 10 - Community Moderator

Re: Filling in field hidden by visibility rules on embedded forms

Dave is 100% right for Pre-Fill and the same approach applies to AutoFill, but I suspect you’re talking about the latter.

 

In Marketo-speak:

  • AutoFill = fill values from browser context including URL and cookies
  • Pre-Fill = fill existing values from lead record in Marketo
monkeyrench12
Level 2

Re: Filling in field hidden by visibility rules on embedded forms

Thank you for the clarification, I was indeed after AutoFill - will bear in mind for the future