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??
Best answer by ilane_sephira
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",placeholders[id])}
// 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 t[$(n).attr("id")].required});for(var n in placeholders){if($("#"+n).length){if(typeof t[n].required!=="undefined"){e[n].notEqual=placeholders[n]}else{e[n]={}}}}})})} });
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.