문제

I'm using the Form Helper in Lithium and wonder how to add the HTML attributes class and id to the output of $this->form->create();? I want to set these attributes on the form element.

도움이 되었습니까?

해결책

As intuitive as $this->form->create(null, ['class' => 'foo', 'id' => 'bar'])

NB: replace null with $something if you are binding an object to the form.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top