Yii Framework Forum: Activeform / Activefield - Yii Framework Forum

Jump to content

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

Activeform / Activefield

#1 User is offline   ORey 

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

Posted 03 November 2013 - 12:12 AM

Hi guys.

Can you provide some examples of advanced ActiveField usage?

Default <?= $form->field($model, 'password')->passwordInput() ?> depend on bootstrap heavily, but in some cases one may want to use custom html markup.

So is there a simple way to output the field, the label and attach validation JS separately?

PS. Currently ActiveFields inside "form-horizontal" ActiveForm create incorrect markup. There should be extra divs around input.
God is real unless declared as integer
0

#2 User is offline   iJackUA 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 30-May 12
  • Location:Ukraine, Kharkiv

Posted 05 November 2013 - 04:26 AM

As I have seen response somwhere on GitHub - ActiveField supposed to work only as all-in-one
and if you need separate representation of field-label - you need to use Html::active...
Don't know what about JS validation attachment.
1

#3 User is offline   ORey 

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

Posted 05 November 2013 - 05:03 AM

Ok, I see, thanks.
I'll investigate how to attach js, I don't think this gonna be a problem.
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