Yii Framework Forum: Form Customization - Yii Framework Forum

Jump to content

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

Form Customization how to customize form Rate Topic: -----

#1 User is offline   jett 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-January 14

Posted 06 January 2014 - 05:47 AM

Hi I am new to Yii Framework, i tried reading some Threads, and watch youtube videos for tutorials on yii, but i didn't find any tutorial on how to customize forms, customizes meaning adding input fields, text area, putting radio button, input fields that computes( get the sum of the 2 fields), etc... not just modifying the LogIn forms. can anyone point me to the right direction on where can i find this tutorials? or if this is easy to do, can give me some step by step guide on how to this, because im really new to this, and no experience in any frameworks. i will really appreciate it. thanks in advance guys and gals.
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 06 January 2014 - 06:10 AM

Forms docs: http://www.yiiframew...1/en/form.model

Basically, there are two form types: unbound (like login form etc) and bound (created from AR models).
So the workflow goes like this:
1. you create form class (or use existing one)

- for unbound forms you extend CFormModel and create some properties for the form (like $login, $password etc)

- for AR forms you can use you AR model (form fields will be defined automatically using table schema, but still you can define some custom fields)

2. you declare some validation rules for form fields

3. you create controller action for processing this form

4. you create form html

and that's it.
God is real unless declared as integer
0

#3 User is offline   jett 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 06-January 14

Posted 06 January 2014 - 09:36 PM

View PostORey, on 06 January 2014 - 06:10 AM, said:

Forms docs: http://www.yiiframew...1/en/form.model

Basically, there are two form types: unbound (like login form etc) and bound (created from AR models).
So the workflow goes like this:
1. you create form class (or use existing one)

- for unbound forms you extend CFormModel and create some properties for the form (like $login, $password etc)

- for AR forms you can use you AR model (form fields will be defined automatically using table schema, but still you can define some custom fields)

2. you declare some validation rules for form fields

3. you create controller action for processing this form

4. you create form html

and that's it.



Hi Orey, thanks for a quick reply, is there a video tutorials that you can recommend on this, so i can visualy see how this is really done. thanks again.
0

#4 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 07 January 2014 - 12:11 AM

Maybe there are some, but I'm pretty sure official documentation should be enough.
God is real unless declared as integer
0

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