How can I create a Marketo form without using field labels and allow multiple rows for the same field? | Community
Skip to main content
Level 2
September 29, 2024
Solved

How can I create a Marketo form without using field labels and allow multiple rows for the same field?

  • September 29, 2024
  • 3 replies
  • 2397 views

Hello community, I need to create a form with the following requirements:

1. A field should be added without a label.
2. The form should allow users to input multiple names and email addresses, essentially adding multiple rows for the same field.
Is it possible to create such a form in Marketo?
Below is sample form:-

PART 2:  YOUR ANNUAL MEMBERSHIP 

 

Please select from the following subscription options below. 

 

 

 

 

 

No. of users/copies 

 

Fee (incl GST) 

 

Online membership $120 per user 

 

  

 

$ 

 

Online + Magazine membership $155 per user 

 

 

 

$ 

 

Additional magazines (available to schools/libraries with an Online or Online + Magazine membership) $100 per issue 

 

 

 

 

 

TOTAL MEMBERSHIP FEE (incl GST) 

 

 

$ 

 

 

PART 3: USER DETAILS:  

Please list the name and email of each user below 

(please list the same number of users as specified above) 

 

Name 

Email address 

 

 

 

 

 

 

 

 

 

 

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

How exactly do you expect the values to be stored in Marketo? As a single semicolon-delimited string?

3 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 29, 2024

How exactly do you expect the values to be stored in Marketo? As a single semicolon-delimited string?

JyotiAn1Author
Level 2
October 7, 2024

Hi @sanfordwhiteman @anildh 
Thank you for your response and the insights on this issue.

To be honest, I'm not entirely sure of the best approach for storing these values. However, if I can store them in one field by concatenating them into a single string, or as you guys suggested, as a semicolon-delimited string, that would work well.

Could you please provide some guidance on how I can store and implement this?
Once again, thank you for your help!

SanfordWhiteman
Level 10
October 7, 2024

Inject (and potentially remove) new <input> elements in response to clicks on your number field, as in my recording.

 

Those inputs will be inside the Marketo <form> container and can be easily made to match the look of other elements, though the Forms 2.0 submission event won’t automatically know about them.

 

In a custom onSubmit listener, grab the values of all the inputs and concatenate them into your desired format.

 

Call addHiddenFields to add the concat’d value to the form. Then it’ll be included in the form data and update the corresponding field in the database.

Level 2
September 30, 2024

1. To remove the labels, simply edit and label and remove everything from it.

2. Marketo doesn’t support this functionality out of the box. You’ll need to implement it using JavaScript. Consider how you’d like to store the data, such as converting the user-submitted information into a semicolon-separated format or JSON.

SanfordWhiteman
Level 10
September 30, 2024

As Anil mentions, it’s pretty easy to add behavior like the below using custom JS. The bigger question is how you plan to ingest the dynamic fields as a single field, and what you plan to do with it later.