Forums

Multi line Tip Tool

compasstg 05 Apr, 2016
How can I make the Tool Tip to be in several rows:
1 - Bad
2 - Poor
3 - Average

etc.
GreyHead 05 Apr, 2016
Hi compasstg,

Have you tried adding <br /> tags to the text? I think that will work.

Bob
compasstg 05 Apr, 2016
I did and it deletes it upon saving. It seems the tip tool is added inside the input tag. trying now the Fyneworks plugin. The goal is to have stars instead of radio boxes (achieved) now I just want descriptions of the rating to show next to the starts. This plugin has the code included I just can't implement it in the form.
GreyHead 05 Apr, 2016
Hi compasstg,

Using <br /> works when I test ?

Bob
compasstg 05 Apr, 2016
Thank you, it did work, but it's rather not a perfect solution for my case.

How and where do I implement the script part of this:

<div>
     <input class="hover-star" type="radio" name="test-3B-rating-1" value="1" title="Very poor"/>
     <input class="hover-star" type="radio" name="test-3B-rating-1" value="2" title="Poor"/>
     <input class="hover-star" type="radio" name="test-3B-rating-1" value="3" title="OK"/>
     <input class="hover-star" type="radio" name="test-3B-rating-1" value="4" title="Good"/>
     <input class="hover-star" type="radio" name="test-3B-rating-1" value="5" title="Very Good"/>
     <span id="hover-test" style="margin:0 0 0 20px;">Hover tips will appear in here</span>
    </div>
   </div>
   <div class="Clear">
    <pre class="code"><code class="js">$('.hover-star').rating({
  focus: function(value, link){
    var tip = $('#hover-test');
    tip[0].data = tip[0].data || tip.html();
    tip.html(link.title || 'value: '+value);
  },
  blur: function(value, link){
    var tip = $('#hover-test');
    $('#hover-test').html(tip[0].data || '');
  }
});</code></pre>
   </div>
GreyHead 07 Apr, 2016
Hi compasstg,

The JavaScript goes into a Load JavaScript action in the setup tab - it needs to be in the On Load event and before the HTML (Render form) action.

Do you have a source for the script you are using? I tested it but couldn't get it to display as written.

Bob
compasstg 07 Apr, 2016
I am using this example and the package of files:

https://www.chronoengine.com/faqs/70-cfv5/5237-how-can-i-use-star-ratings-in-my-cfv5-form.html

I got the stars working, but I can't get the hower text to work. I tried adding the OnLoad Java Script as you suggested, but it does not work.
This topic is locked and no more replies can be posted.