Skip to main content
January 7, 2013
Question

Question about inline form labels with jquery

  • January 7, 2013
  • 2 replies
  • 1053 views
I am trying to incorporate this jquery "fix" from the Marketo archives, but find that this code then allows the form to be submitted without the user having entered any data, due to the fact that the form field now populates the field until the user enters data.

Article in question : https://community.marketo.com/MarketoArticle?id=ka050000000L7o6AAC

Anyone using this have a solution I may borrow?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

January 8, 2013
Naor, I don't have the code written, but a basic validation script (if value equals label, clear field onSubmit) should fix this. Check StackOverflow, my favorite website for stuff like this!
January 8, 2013
Hey Naor --  Try this and see if it helps..


<***** type="text/javascript">
  // test and setup jQuery in no conflict mode
  if (typeof $jQ == 'undefined') {
  var $jQ = jQuery.noConflict();
  }
  function formSubmit(elt) {
  return Mkto.formSubmit(elt);
  }
  function formReset(elt) {
  return Mkto.formReset(elt);
  }
   
  deleted some info
  };
  </******>


replaced script with *****