How to get the unfilled or filled fields list in a form by a known lead? | Community
Skip to main content
New Participant
September 11, 2020
Question

How to get the unfilled or filled fields list in a form by a known lead?

  • September 11, 2020
  • 1 reply
  • 2217 views

Hello Marketo Nation,

 

I am trying to implement custom progressive profiling in our forms. Here is the issue that i am facing and would like your suggestion to resolve it.

 

I am trying to get the unfilled fields by a known lead so that i can display those in the next return visit. I cannot use the lead tokens in the landing page as we cannot expose that information in the page. Is there any API to get the list of filled or unfilled field names without exposing the actual values?

 

i tried using the internal marketo API call ('/index.php/form/getKnownLead?_mkt_trk='+encodeURIComponent(munchkinCookie)+'&form=xxxx&munchkinId=xxx-xxx-xxx&filledFields=false';) but it is only giving Firstname, Lastname and not any other unfilled fields. In the filledFields list also it is not giving the list of filled fields properly. Whatever fields are filled in the first visit are not part of the filledFields list also.

 

Could you please suggest any possible solutions to resolve this.

 

Thanks in advance.

DP

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
September 11, 2020

I don't understand why this is different from standard Progressive Profiling - which displays only empty fields (within the ProgPro fieldset) and does not reveal any values.

dadusumaAuthor
New Participant
September 11, 2020

This is different because the fields are displayed dynamically by reading a custom configuration. The number of fields and order of the fields is as per the configuration and can be configured differently for different forms. Also the fields displayed can be configured differently based on the segment the user belongs to. All the fields will be available in the form and will be hidden initially. The fields will be shown for unknown and known users as per the configuration.

So for known users based on the the configured fields and the no of fields to display at a time i need to display the unfilled fields from the configured fields.

SanfordWhiteman
New Participant
September 12, 2020

You should still base this logic on the native ProgPro. There's no need to rewrite the logic.

 

Add all your fields to the ProgPro block. Then Marketo will only render the unfilled fields — that's taken care of automatically.

 

Hide the form element by default.

 

When the form is ready (you listen for the whenReady event), rearrange the unfilled field rows as necessary and remove those rows which the person should not see at all.

 

Then unhide the form element.