Forms: custom code to change placement of just one field

Anonymous
Not applicable

Forms: custom code to change placement of just one field

I have a form with the fields displayed above the cells but I want the last field to be displayed to the left of its cell (it's a checkbox). Marketo Support said this requires custom coding. Anyone know how to do this? 

Also, how do you stylize the links in a form? Is this something you have to adjust using custom CSS? 

Thanks,

David

Tags (1)
6 REPLIES 6
Kenny_Elkington
Marketo Employee

Re: Forms: custom code to change placement of just one field

Hi David,

Could you provide an image example of what you're trying to do?
Anonymous
Not applicable

Re: Forms: custom code to change placement of just one field

Thanks for the reply. I'd like to display the checkbox at the bottom to the left or right of 'I have read...' I'm also curious about how to stylize the link colors. I have a separate post on the forum asking about another aspect of this form: see https://community.marketo.com/MarketoDiscussionDetail?id=90650000000PthtAAC


0EM50000000SD9z.jpg
Anonymous
Not applicable

Re: Forms: custom code to change placement of just one field

Hi David,

Yes this requires some custom code. Shoot me an email at info@leadlizard.com and I'll have one of our developers tell you how long it would take to do. Looks straightforward.

Kenny_Elkington
Marketo Employee

Re: Forms: custom code to change placement of just one field

Hi David,

For this field, you'll want to change the type to 'Checkboxes' and delete the Label field.  Once you've done this, select Edit values and set your text in the display value of the field.  Once you've done that, you'll need to hide the associated <label>.  Assuming you have jQuery on the page, you can do something like this:

$("label[for='yourFieldName']").hide();
Dory_Viscoglio
Level 10

Re: Forms: custom code to change placement of just one field

Hi David,

I've got this baked into our landing page template to put the checkbox on the left:

label[for=YOURFIELD] {
    float:right!important;
    margin-left: 10px!important;
    width:316px!important;    
}


You can adjust the width and margin as necessary. Hope this helps!
Anonymous
Not applicable

Re: Forms: custom code to change placement of just one field

Hi Kenny,

I followed your tip but I don't know what you mean by this:

Once you've done that, you'll need to hide the associated <label>.  

Also, if the field value is entered under Edit Values, then I don't know how to insert the hyperlink. How does that work? Is it possible? Additionally, the asterisk for this field now appears on 1 line and the checkbox and field value appear on the next. 

I don't have any foundation in JQuery so I'm not sure what to do with this: 

Assuming you have jQuery on the page, you can do something like this:


$("label[for='yourFieldName']").hide();


Dora, thanks for your reply. I haven't put the form on a landing page yet since the form itself isn't ready. We're planning to drop this form into our website. Maybe I can try inserting that code and see what happens. 


I've been working with Marketo for about a week and so far it's been lots of headaches. Ugh.