Forums

radios + stars do not works

sergeweb54 22 Nov, 2014
i have followed the tuto : http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/3224-how-can-i-use-star-ratings-in-my-form.html
i want to have radio buttons with stars rating
so , it loads the script, it loads mootools too, but it does not work

on firebug i have this error :
TypeError: $(...) is null
tip.inject($(radio+'_container_div').getChildren('div')[0]);

the code concerned in javascript file is :
tip.inject($(radio+'_container_div').getChildren('div')[0]);

has anybody already have this problem?

Thanks
GreyHead 22 Nov, 2014
Hi sergeweb54,

The FAQ was written a couple of years ago for CFv4. In CFv5 the naming of the <div>s that ChronoForms uses has changed so the CSS SElector used her radio+'_container_div doesn't match any existing <div> :-(

You can probably update the code to match the new <div> structure but the *right* answer would be to re-write this using jQuery and not MooTools. I'll add that to my 'to-do' list . . .

Bob
sergeweb54 22 Nov, 2014
thanks for your answer.
would you help me to target this div even with mootools ?
Serge
sergeweb54 22 Nov, 2014
i also tried the code with CF4 and j3.3.6 i have always the same error
GreyHead 22 Nov, 2014
Hi sergeweb54,

Please try this for CFv5 on Joomla! 3

[[>> Content moved to [url=http://www.chronoengine.com/faqs/70-cfv5/5237-how-can-i-use-star-ratings-in-my-cfv5-form.html]this FAQ[/url] <<]]

Bob
sergeweb54 22 Nov, 2014

Get the 'fyneworks' Star Rating code here



the link is not good
GreyHead 22 Nov, 2014
Hi sergeweb54,

Sorry, I corrected the link.

Bob
sergeweb54 22 Nov, 2014
thanks a lot, you're great !!
this works perfectly

going to bring you some beers
This topic is locked and no more replies can be posted.