Hi,
I have a requirement for a Marketo form where the form fields should be visible based on segments.
There are three segments (eg. seg1, seg2 and seg 3) and three form fields. Field1 should be visible to a set of people belonging to seg1 and so on. Can we implement this?
Solved! Go to Solution.
It’s very possible and quite simple!
Create a Form Visibility Manager field. I typically have 3 or 4 such fields in every instance. They’re just standard String fields:
This is the field you’ll add to the form as a Hidden field to control visibility.
Then create a mktoText
area on the page (put it just before the closing <body>
tag) and make that mktoText
dynamic using your desired Segmentation.
Each variant has a tiny bit of JS to sets the Hidden field to the corresponding segment, i.e. this is for the segment “US”:
<script>
MktoForms2.whenReady(function(readyForm){
readyForm.setValues({
formVisibilityManagerA: "US"
});
});
</script>
And this is for the segment “MX”:
<script>
MktoForms2.whenReady(function(readyForm){
readyForm.setValues({
formVisibilityManagerA: "MX"
});
});
</script>
Just treat Form Visibility Manager A as if it were the segmentation.
@SanfordWhiteman Thanks for your response. I will implement the solution.
One more doubt I have- What if a person is present in more than one segment? (segments are created for three different type of newsletters. So it is highly possible a person may present in more than one segment).
Hi @harshadoak ,
With Marketo Visibility Rule you can definitely design your form to show specific fields based on specific conditions.
The only condition here will be the customer will have to select their segment 1st & based on their selection corresponding fields can be displayed.
In your given scenario if the customer select Seg1 then a new field titled Job Title will be displayed.
Similarly if customer selects Seg2 a new field of country will be displayed
Hope this Helps 😊
Thanks for you response however my requirement is slightly different. We have created segments to categorise the target audience. Based on the segments, form fields should be visible to only those set of people.
Unfortunately, we can not pull segments in Marketo forms, we can only add fields.
It’s very possible and quite simple!
Create a Form Visibility Manager field. I typically have 3 or 4 such fields in every instance. They’re just standard String fields:
This is the field you’ll add to the form as a Hidden field to control visibility.
Then create a mktoText
area on the page (put it just before the closing <body>
tag) and make that mktoText
dynamic using your desired Segmentation.
Each variant has a tiny bit of JS to sets the Hidden field to the corresponding segment, i.e. this is for the segment “US”:
<script>
MktoForms2.whenReady(function(readyForm){
readyForm.setValues({
formVisibilityManagerA: "US"
});
});
</script>
And this is for the segment “MX”:
<script>
MktoForms2.whenReady(function(readyForm){
readyForm.setValues({
formVisibilityManagerA: "MX"
});
});
</script>
Just treat Form Visibility Manager A as if it were the segmentation.
@SanfordWhiteman Thanks for your response. I will implement the solution.
One more doubt I have- What if a person is present in more than one segment? (segments are created for three different type of newsletters. So it is highly possible a person may present in more than one segment).