Skip to main content
October 1, 2013
Question

How to have a link in label of a form field

  • October 1, 2013
  • 1 reply
  • 634 views
I have a good lesson learned today, and here to share with anyone interested in:

Requirement:
I have a form, there is a terms&condition checkbox field there, which label is "I Agree to terms&condition" . i want to have terms&condition linked to my company's privacy. How make it?

Solution:

Add a custom html snippet on the landing page, copy&pased the following JS code, changed accordingly.

<script type="text/javascript">
var $jQ = jQuery.noConflict();
$jQ(document).ready(function(){
// hyperlink the terms&condition field label
var chBox = $jQ("#ChkboxFieldName").parent().parent(); 
var plcLabel = chBox.children(":first");
plcLabel.html("I agree to the  <a href='http://www.pactera.com/privacy/' style='text-decoration:none;color:#de0000' >terms&condition</a>.");
});
</script>


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

1 reply

October 1, 2013
I just left a similar reply in the thread above this one. http://community.marketo.com/MarketoDiscussionDetail?id=90650000000PghhAAC