The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Tool tips for form fields
Source: http://www.techmavenconsulting.com/2014/10/02/formiable-pro-tooltips-tutorial/
Update 10/2/2014
I've updated my tutorial and linked it elsewhere for modern times.
Update 12/29/2014
Provided a fix for "full" width input fields.
Note: Depending on the theme you are using you may have to do some additional CSS changes/modifications for it to look nice.
September 9, 2013 at 11:50 am
That's great Robert - thanks for the tips !
September 9, 2013 at 12:14 pm
Ha! I see what you did there (intentionally or not).... Glad I could help.
September 20, 2013 at 8:03 am
Hi Robert. Thanks very much for the idea. I couldn't get it to work entirely (cuts off text to right in a three-column format and doesn't accept "hint--top"), and I suppose that'll take some fine-tuning on my end. But the tip is a very welcome one, as it certainly would not have occurred to me. I'll look for another tooltip script that's friendly to your much appreciated solution.
September 20, 2013 at 8:52 am
I noticed that too in certain cases. It depends how deep within divs your forms are and what sort of styling is applied to them. I haven't got an answer for that just yet, but I'm looking. What I've done so far is shorten the widths of my fields on a field-by-field basis to keep them within the container they are shown.
September 21, 2013 at 7:44 am
As a follow-up, the tooltip suggested by Robert is now working perfectly on my forms (I wish I knew why it did not when I first tried it; but I deleted the Hint css, tried out other possible solutions, decided to give this one another shot, and it now works).
I do have a related tip to pass on to others interested in using Robert's solution (one I searched for and found within the Hint.css repository at Github). The tooltip css as written results in a single line of text (which should suffice in most cases). If, however, you have extra-long hints and don't want your tooltip to span the entire form and prefer instead to use multiple lines with a limited pixel length, look for "white-space: nowrap;" in the original css. Change that to "white-space: normal;", then add max width and min width properties just above that. As an example, I have mine set as follows:
max-width: 150px;
min-width: 150px;
white-space: normal;
October 13, 2013 at 1:08 pm
This is a really great capability. I am using it with the Jetpack plugin which enables you to use this CSS without modifying a theme file (useful because you don't have to remember to modify a file if you change themes).
October 13, 2013 at 8:23 pm
Hi jnash
Creating a child theme (See Wordpress codex) allows you to do the same thing (as well as for php functions). It's simple and, as you note, a really good idea for those who don't want to mess with the main theme--or worse, with the core of the Wordpress installation.
September 29, 2014 at 3:44 am
Hi peeps,
Could someone please paste the code that Robert Clapp first posted, as it is no longer available.
Thanks !
October 2, 2014 at 8:36 pm
Updated!
October 4, 2014 at 5:36 pm
Thanks ever so much will give that a try
:-)
October 6, 2014 at 6:17 pm
Did you get it working admingenie?
October 7, 2014 at 12:03 am
Hi Robert, yeah got it working no problem, just does not suffice for what we need.
Have reverted to using Tippy, just seeing if I can get some custom code setup so that Tippy can be used on the radio buttons independently.
I am skilled in using HTML/CSS, and in the past worked with Java, C#, SQL etc, but Javascript, no and dont have the time to learn another language.
Cheers
October 7, 2014 at 11:18 am
My example works independently on radio buttons. Am I missing something to this request?
http://paste2.org/yfGjxZxN
December 29, 2014 at 7:09 am
Robert, thanks so much for posting these tips - super helpful. I do have a question though. Any idea why when using the hint.css the width of the input field is no longer the entire available width?
See example: the (address 1) field has a hint applied to it, while the (address 2) field does not. Notice how the width of (address 1) is much narrower.
December 29, 2014 at 1:14 pm
I thought I had resolved that. I'll look at it again.
December 29, 2014 at 2:10 pm
jcposada
I've updated my original tutorial once again (The quick and dirty copy and paste version from firebug). We have to add:
.with_frm_style input[type="text"], .with_frm_style input[type="password"], .with_frm_style input[type="email"], .with_frm_style input[type="number"], .with_frm_style input[type="url"], .with_frm_style input[type="tel"], .with_frm_style select, .with_frm_style textarea, .frm_form_fields_style, .with_frm_style .frm_scroll_box .frm_opt_container, .frm_form_fields_active_style, .frm_form_fields_error_style, .with_frm_style .chosen-container-multi .chosen-choices, .with_frm_style .chosen-container-single .chosen-single {
width: 550px !important;
}
Into the "before fields" content as indicated in my tutorial. Note: Change the width value as necessary.
December 30, 2014 at 9:23 pm
Thanks very much Robert, works like a charm now!
September 17, 2015 at 5:35 am
Hi,
Thanks for the post! I've managed to get the tooltips to work. However as "Foreigner" mentioned earlier, I also have some particularly large tooltips to add. Thus I would like to insert / force the text onto a new line. I followed the advise:
max-width: 150px;
min-width: 150px;
white-space: normal;
But had no luck, (see attached screenshot)
Is anybody else able to advise how to achieve this?
Thanks in advance,
Matt
September 17, 2015 at 8:51 am
Is the site public facing? Can you provide a link?
September 17, 2015 at 10:17 am
The website hasn't launched yet, but yes it will be customer facing. The specific page is....
http://occdtrader.com/create-ad/
But I believe you'll need to register to see the form containing the tooltips.
Thanks,
Matt
September 17, 2015 at 10:42 am
I registered. Still unable to view it. (dgodfather)
September 17, 2015 at 12:54 pm
You should have received an email with some sort of link, if you click that and then log back in it should work. Did you receive the email?
September 17, 2015 at 1:00 pm
I went to the page in question after logging in. It's missing. Is it set to "private"?
September 17, 2015 at 1:03 pm
Apologies, try this one... http://occdtrader.com/sell-a-car/
September 17, 2015 at 1:29 pm
Below is all I see. Do I have the appropriate permissions to view the form?
September 18, 2015 at 3:25 am
Sorry I'm having a shocker... It should be fine now!
September 18, 2015 at 6:31 am
I was hoping to troubleshoot the issue, but I do not see any problems that exist. I tested it in Firefox and MS Edge and all your tooltips look fine. Is there another place where the attachment you provided earlier shows up? What browser are you viewing with?
September 18, 2015 at 6:38 am
I'm using Chrome.
The tool tips seem to function correctly, what I am trying to do is force the text (with in the tooltip) onto another line. i.e. one of my tooltips "Does the car have upgraded or aftermarket bucket seats?" is rather long, so I would like to insert a new paragraph / line break, somehow?
If that makes any sense...
September 18, 2015 at 6:40 am
It does. I will test on my demo site and try and provide something.
September 18, 2015 at 6:55 am
You'll need to edit the hint css file and add/change:
width:150px;
white-space:normal;
To the following piece of code:
.hint:after,[data-hint]:after{content:attr(data-hint);background:#383838;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:no-wrap;text-shadow:0 -1px 0 #000;box-shadow:4px 4px 8px rgba(0,0,0,.3);}
September 18, 2015 at 7:01 am
That's perfect... Exactly what I was looking for!
Thank you soo much for your help (and apologies for the chaos I've caused)!
Many, many thanks,
Matt :)
September 18, 2015 at 7:11 am
No worries. Enjoy!
Discussion closed.