This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » mpStarRatin/mpFormChoiceRating Plugin
mpStarRatin/mpFormChoiceRating Plugin [message #101613] Fri, 25 June 2010 16:49 Go to next message
koffeeKoffee  is currently offline koffeeKoffee
Messages: 1
Registered: June 2010
Junior Member
Hi all,
I am desperately trying to implement the mpStarRatingPlugin (or mpFormChoiceRating) from the symfony plugins page. The Radiobuttons are hidden after loading but the StarRating widget is not shown.

Below my code:
Form:
	public function configure()
	{
		
		
		$options = array(1 => 'mangelhaft', 2 => 'ausreichend', 3 => 'zufriedenstellend', 4 => 'gut', 5 => 'sehr gut');
				
		$this->widgetSchema['rating'] = new mpWidgetFormChoiceRating( array('choices' => $options ) );		
		
		$this->validatorSchema['rating'] = new sfValidatorChoice(array(
			'choices' => array_keys($options)));

...


when loading the page and viewing the code i see:
<table> 
<tr> 
  <th><label for="bewertung_rating">Rating</label></th> 
  <td><div id="wrapper_bewertung_rating" class="starify"><ul class="radio_list"><li><input name="bewertung[rating]" type="radio" value="1" id="bewertung_rating_1" />&nbsp;<label for="bewertung_rating_1">mangelhaft</label></li> 
<li><input name="bewertung[rating]" type="radio" value="2" id="bewertung_rating_2" />&nbsp;<label for="bewertung_rating_2">ausreichend</label></li> 
<li><input name="bewertung[rating]" type="radio" value="3" id="bewertung_rating_3" />&nbsp;<label for="bewertung_rating_3">zufriedenstellend</label></li> 
<li><input name="bewertung[rating]" type="radio" value="4" id="bewertung_rating_4" />&nbsp;<label for="bewertung_rating_4">gut</label></li> 
<li><input name="bewertung[rating]" type="radio" value="5" id="bewertung_rating_5" />&nbsp;<label for="bewertung_rating_5">sehr gut</label></li></ul>    </div> 
    
    <script type="text/javascript"> 
    jQuery(document).ready(function() {
      
      // get the table text and put in the title attribute on radios
      jQuery("#wrapper_bewertung_rating > ul.radio_list > li").each( function(){
        jQuery( this ).find('input').attr('title', jQuery( this ).find('label').text());
      });
      
      // Create caption element
      var caption_bewertung_rating = jQuery('<div id="caption_bewertung_rating" class="caption"></div>');
      jQuery("#wrapper_bewertung_rating").children().not(":radio").hide();
      jQuery("#wrapper_bewertung_rating").stars({
        inputType: 'radio',
        cancelShow: false,
        captionEl: caption_bewertung_rating,
      }).append(caption_bewertung_rating);
 
    });
    </script></td> 


i installed the plugin as described in the readme file.

Anyone got a hint, where the problem may be located? Is the plugin properly working?

greetings,
Koffee Koffee
Re: mpStarRatin/mpFormChoiceRating Plugin [message #101779 is a reply to message #101613 ] Tue, 29 June 2010 17:26 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi koffeeKoffe,
Have you solved the problem?

I'm trying to install mpFormChoiceRating Plugin but it doesn't work. I dont see the stars.

Regards.
Re: mpStarRatin/mpFormChoiceRating Plugin [message #102220 is a reply to message #101613 ] Thu, 08 July 2010 21:06 Go to previous message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi,
Someone use this plugin? I can not make it work.Stars do not appear.

Thanks.
Previous Topic:What query method for sfPropel15Plugin is equal to Peer's doSelectWithI18n?
Next Topic:A list plugin
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software