Help Needed: Dynamic Form

Dear all,

i need help about dynamic form, i have a form, with two part. i want to load one part of the form based on a category selection.

4795

dynamic.jpg

can any one help me about this? i did not apply much the ajax of yii, if any one know about any extension like this…or any guideline about this that will be very helpful.

Thanks

Ivan

Hi,

( i dont know if those fields are required for any of the selected. )

I would go on either of the following ways :

  1. 2 different models .

  2. hidden div and ajax show the div. ( scenario of the model for validation and such will be declared by the selected value )

i think option 2 is better since you can decide who will show and who not in the js, and in the php with scenario you can select who you validate and the rest you can unset