Hello,
I know the syntax for placeholder is: $(
".email input"
).attr(
"placeholder"
,
"example@email.com"
);
How would I be able to put 2 or more placeholder texts if I have a multiline field?
Regards,
Sahil
Hello,
I know the syntax for placeholder is: $(
".email input"
).attr(
"placeholder"
,
"example@email.com"
);
How would I be able to put 2 or more placeholder texts if I have a multiline field?
Regards,
Sahil
Hi Sahil,
Make sure to put the '\n' between the text you want on each line. It works for me!
Hi Sahil,
Try this out: $('.email textarea').attr('placeholder','example1@email.com\nexample2@email.com');
For multi-line fields, the 'input' is 'textarea'. Then you can add a new line with '\n'.
Let me know if this works for you!
You mean two or more lines of placeholder text into a multiline field?
Yes Ege
Alex,
(Sorry I wrote Ege earlier)
I tried this:
$("#q140 input").attr("placeholder", "Min: CHF 3'500 - Max: CHF 7'000");
$("#q212 input").attr("placeholder", "Min: CHF 3'500 - Max: CHF 7'000\n what the hell is this");
The field 140 is single line & works, 212 is Multiline & doesn't work :(
Alex,
I'm sorry, think I went blind for a minute.
Works Perfectly, Awesome!!!
Only problem is it doesn't do line break, so adds text in the same line.
Any chance to say when to create text in next line?
I have same, but no luck :(
Alex,
It seems to work on IE, but not on Safari or Firefox on mac???
Any ideas?
Guess, it's because I have El Capitan...... Since Steve has died, Mac is shit.
Sorry about the trouble & Again, Thanks!!!!