Yii Framework Forum: [Extension] Selectable Formparts (FormPartSelector) - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] Selectable Formparts (FormPartSelector)

#1 User is offline   iceboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 24-December 08

Posted 08 January 2009 - 04:24 PM


this is just a tiny Extension or Widget , allows you to create a form containing different parts, the user can select one to fill out.

I've used the CTabView Widget to create this one.

Hope this helps someone else (it helps me of course)

from munich,

Attached File(s)


#2 User is offline   horizons 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 128
  • Joined: 18-December 08

Posted 11 February 2009 - 04:57 AM

Hi, I have just tested your extension and it works very well.

I would add following into the renderBody()  to also have a legend in the fieldsets.

echo '<legend>'.$part['legend'].'</legend>';

above this line 'if(isset($part['content']))'

Also add the 'bitte wählen' and '----' option via htmloptions in renderHeader()

$htmlOptions=array('id'=>'PartSelector','prompt'=>'Bitte auswählen','empty'=>'----------------');
echo CHtml::dropDownList('PartSelector', $this->activePart, $dropDownData, $htmlOptions);

And not use -2 -1 as value for it.

With this change you could also change the jquery code and check for a value of the selected option and only change the display if a value is given.

if (jQuery("'.$partSelectorSelector.'").val())

Everything else is quite good
gruß aus Heidelberg ;)
Regards Horizons

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users