11 Replies Latest reply on Mar 7, 2016 10:16 AM by Duane Kennerson

    .mktoFormCol (2 column form... sort of)

    Duane Kennerson

      Well, I have a need to use a two column layout but some of my inputs need to be 100% width of the form. It's seems that as soon as I drag a form field into a second column, every input gets put into a div with the .mktoFormCol class. How can I override .mktoFormCol on only some inputs?

       

      Any thoughts?

       

      Thanks

        • Re: .mktoFormCol (2 column form... sort of)
          Grégoire Michel

          Hi Duane,

           

          You are hitting one limitation of the forms 2.0: Marketo is not assigning IDs to form elements, which makes it difficult to style one or few of them differently.

           

          I remember that Sanford Whiteman wrote quite a few things on this, including a method to add distinct ids or classes to each element, so that they can be styles easily, but I have not been able to find the post.

           

          -Greg

            • Re: .mktoFormCol (2 column form... sort of)
              Duane Kennerson

              Hey Greg,

               

              Yeah, I figured that would be the case when looking at the code it spit out. We are just going to use the API with our current styled forms and not worry about building them in Marketo.

               

              Would like to see the ability to:

              -Give each form element their own id

              -Override the two column css. Maybe a check box that allows the input to span the entire width of the container

              -Set percentages for input widths

                • Re: .mktoFormCol (2 column form... sort of)
                  Sanford Whiteman

                  I hope you mean the Forms 2.0 API when you say "API."

                   

                  What Greg is referring to is a code snippet like the one in MktoForms2 :: Tag Wrapper Elements. I include such a script whenever I want to tweak a Marketo form.  As you can see, you can then use CSS to easily manipulate the container DIVs by the name of the form fields they contain. 

                    • Re: .mktoFormCol (2 column form... sort of)
                      Duane Kennerson

                      We didn't end up using the API. We did a simple cURL post method to insert the the data from the form into Marketo. This way we didn't have to mess with our current forms and the styling headaches we were getting.

                       

                      Do you see an issue with that? We're really new to Marketo...

                        • Re: .mktoFormCol (2 column form... sort of)

                          Hi Duane,

                           

                          If you use cURL to post your form data to Marketo server, the lead will be created / updated fine.

                           

                          But lead's machine will not be 'cookied' by Marketo. So all the powerful functionality Marketo brings to table like, tracking website visits, pre-filling form fields, progressive profiling etc would not work that well till that lead gets cookied.

                           

                           

                          Rajesh

                          • Re: .mktoFormCol (2 column form... sort of)
                            Sanford Whiteman

                            Do you see an issue with that? We're really new to Marketo...

                            Yes. It creates a DoS attack vulnerability.  The Forms 2.0 endpoint will only process 30 forms per minute for your entire instance (that includes, of course, malicious use of your forms by hackers).  A mildly successful CTA can easily exceed that limit, and you will never get those leads.  Server-side form posts are not recommended in a professional setting. 

                             

                            The correct practice when using a custom form is to Make a Marketo Form Submission in the background using the Forms 2.0 API.  This does not affect your ability to design a custom form to your liking, but makes sure that you will not be strictly rate-limited.

                             

                            (Rajesh also mentioned that you need to include the Munchkin cookie when performing a form post.  This, however, can be done using a server-side form post as long as it is implemented appropriately, so it is not the primary issue.)

                              • Re: .mktoFormCol (2 column form... sort of)
                                Duane Kennerson

                                Hey Sanford, thanks again for all you input on this issue.

                                 

                                We have a honeypot in place that limits form submissions based on several criteria. It's been in place for a couple of years now with no issues so our thinking is that we are covered in that aspect.

                                 

                                We are also sending the cookie data per Marketo's documentation (see my reply to Rajesh). I'm not trying to be difficult but I "think" we are ok on the issues that have been raised. I don't want anyone to throw their hands up and say whatever you dumb ***** want to do (lol) so if you feel strongly that this is a bad way to go, just say so.

                                 

                                Such a trivial thing that could be solved by simply allowing id's to form elements...

                                 

                                Thanks!

                                  • Re: .mktoFormCol (2 column form... sort of)
                                    Sanford Whiteman

                                    We have a honeypot in place that limits form submissions based on several criteria. It's been in place for a couple of years now with no issues so our thinking is that we are covered in that aspect.

                                    Unless you can prove that the your server will never let more than 30 form posts in per minute, it isn't protecting you.  30/m is extremely easy to exceed if you have a popular send (or, for that matter, a very unpopular one that sends people screaming for the Unsubscribe form).  And that's outside of malicious hits.  Once a mildly skilled hacker hooks up an old 56K modem (just kidding, they would actually use multiple bots, but the fact is they could use a modem for a rate this low).

                                     

                                    I hope your server bears in mind that IPs are shared (that is, your server can't simply allow post per IP per <unreasonably long period>).  If that same popular send engages multiple people at the same company and location, chances are they're sharing the same IP.  (Same reason that Marketo's limit is strict, but not unreasonably draconian, since they have to allow for a certain pace of legit posts from the same IP.)

                                     

                                    In sum, unless I knew what rules you were following on the server I couldn't say one or the other.  Certainly you could mirror Marketo's rule and limit to 30/m from the same remote IP.

                                     

                                    I don't want anyone to throw their hands up and say whatever you dumb ***** want to do (lol) so if you feel strongly that this is a bad way to go, just say so.

                                    I do think it's a bad design: you must avoid rate limits if you want to claim to be resilient.  Marketo's servers are designed for massive form traffic, so use them.

                                     

                                    Such a trivial thing that could be solved by simply allowing id's to form elements...

                                    What exactly do you want a form's HTML fragment to look like?  Surely this can be done with a touch of JS.

                                      • Re: .mktoFormCol (2 column form... sort of)
                                        Duane Kennerson

                                        Thanks Sanford. We're pretty confident with the honeypot although certainly nothing if fool proof but it's done a good job of filtering/limiting so far.

                                         

                                        Yes, js could do the trick. We just need some of the form fields to span multiple columns but my point is that the end user (especially if they are not well versed in js) should not have to rely on that. Although I guess you could say the same for css... Just wish we had a little more control over it than putting hacks in place.

                                         

                                        Thanks for all your help! It's appreciated.