I had the above issue and solved it using javascript and jquery selectors
below is my code, note all you need to do is add in the default values in the backend editor and the below will remove and add it back if nothing is added.
Edit: this code here will remove the space html entity from the form fieldsets
$('fieldset.vfb-fieldset').html(function(i,h){
return h.replace(/ /g,'');
});
Edit: everything below here is the default text replacer
var el = $('input[type=text], input[type=tel], input[type=email], textarea');
el.focus(function(e) {
if (e.target.value == e.target.defaultValue) e.target.value = '';
});
el.blur(function(e) {
if (e.target.value == '') e.target.value = e.target.defaultValue;
});
Hope that helps.
-
This reply was modified 9 years, 3 months ago by
keyinora.
-
This reply was modified 9 years, 3 months ago by
keyinora.
-
This reply was modified 9 years, 3 months ago by
keyinora.
Thanks so much for chiming in!
Where do you suggest I add this?
I generally try not to modify plugin code for the sake of updates but certainly willing to make an exception to get the look I need.
Hi there, the Pro version(3.0) has the options for Placeholders, feel free to play around with the demo version. URL below.
http://demo.vfbpro.com/
Thanks!
Shane
VFB pro
Hi Shane,
I purchased VFB pro but do not see placeholder text option – perhaps I am missing the obvious – please advise.
Thanks!
Actually to clarify – I see placeholder text but I want that in place of the field text above the field. This allows for a tighter form design. How do I eliminate the field titles and just have placeholder text?
The only option would be to leave the field titles empty and have placeholder fields available, or use CSS to hide the titles at page level so that they are still there within the email and such.
Thanks!
Shane
VFB Pro
Thanks Shane – can you provide the correct css to hide the page titles at page level only please?
Thanks!
The other thing I am noticing is I also need the asterisk to be inside with the placeholder text (with required fields) not on top of the field.
Thanks again!