SOLVED

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

Go to solution
jyotimishra
Level 1

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

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 

 

 

 

 

 

 

 

 

 

 

Tags (1)
5 ACCEPTED SOLUTIONS

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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

View solution in original post

anild
Level 1

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

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.

Anil Dhull

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

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

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.

SanfordWhiteman_1-1727739072404.gif

 

View solution in original post

jyotimishra
Level 1

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

Hi @SanfordWhiteman @anild 
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!

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

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

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

jyotimishra
Level 1

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

Hi @SanfordWhiteman @anild 
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 - Community Moderator

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

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.

anild
Level 1

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

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.

Anil Dhull
SanfordWhiteman
Level 10 - Community Moderator

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

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.

SanfordWhiteman_1-1727739072404.gif