I only see an option to put form titles above or to the side of the fields
how do i put the form titles in the fields??
I only see an option to put form titles above or to the side of the fields
how do i put the form titles in the fields??
Hi,
you need to hide labels field and Add a Javascript to write labels IN the form fields.
See /topics/field-label-inside-of-field
will i only see the change in preview? I have tried twice and looked in preview and can not see it - i will keep trying
Did you add the JS below ??
Take care : Placeholders names must be the same in your form settings !!
if not, You’ll need to change these to match the fields in your page that you want to give placeholders to.
lp.jQuery(function($) {
// Define your placeholder texts here, corresponding to Unbounce's field names
var placeholders = {
"first_name": "First Name",
"last_name": "Last Name",
"email": "Email"
};
// Sets the HTML5 placeholders
for(var id in placeholders){$("#"+id).attr("placeholder",placeholdersdid])}
// Polyfill to add support for browsers like IE<=9
if(document.createElement("input").placeholder===undefined){$("html").attr("data-placeholder-focus","false");$.getScript("//jamesallardice.github.io/Placeholders.js/assets/js/placeholders.jquery.min.js",function(){$(function(){var e=window.module.lp.form.data.validationRules;var t=window.module.lp.form.data.validationMessages;lp.jQuery.validator.addMethod("notEqual",function(e,t,n){return this.optional(t)||$(t).attr("data-placeholder-active")!=="true"||e!==n},function(e,n){return tr$(n).attr("id")].required});for(var n in placeholders){if($("#"+n).length){if(typeof ton].required!=="undefined"){e"n].notEqual=placeholdersdn]}else{esn]={}}}}})})} });
Thanks, ilane_sephira! This was super helpful.
Is there a way to change the label color? I have other input fields that are #9c9c9c and it is defaulting to the same gray for the labels which I would like a different color to contrast from the field background.
Thanks!
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.