@@ -115,6 +115,10 @@ protected function addElements()
115115 $ this ->add ([
116116 'type ' => 'text ' ,
117117 'name ' => 'email ' ,
118+ 'attributes ' => [
119+ 'class ' => 'form-control ' ,
120+ 'placeholder ' => 'name@example.com '
121+ ],
118122 'options ' => [
119123 'label ' => 'E-mail ' ,
120124 ],
@@ -124,6 +128,10 @@ protected function addElements()
124128 $ this ->add ([
125129 'type ' => 'text ' ,
126130 'name ' => 'full_name ' ,
131+ 'attributes ' => [
132+ 'class ' => 'form-control ' ,
133+ 'placeholder ' => 'John Doe '
134+ ],
127135 'options ' => [
128136 'label ' => 'Full Name ' ,
129137 ],
@@ -135,6 +143,9 @@ protected function addElements()
135143 $ this ->add ([
136144 'type ' => 'password ' ,
137145 'name ' => 'password ' ,
146+ 'attributes ' => [
147+ 'class ' => 'form-control '
148+ ],
138149 'options ' => [
139150 'label ' => 'Password ' ,
140151 ],
@@ -144,6 +155,9 @@ protected function addElements()
144155 $ this ->add ([
145156 'type ' => 'password ' ,
146157 'name ' => 'confirm_password ' ,
158+ 'attributes ' => [
159+ 'class ' => 'form-control '
160+ ],
147161 'options ' => [
148162 'label ' => 'Confirm password ' ,
149163 ],
@@ -154,21 +168,24 @@ protected function addElements()
154168 $ this ->add ([
155169 'type ' => 'select ' ,
156170 'name ' => 'role ' ,
157-
158171 'options ' => [
159172 'label ' => 'Role ' ,
160173 'value_options ' => $ this ->rolesselector ,
161174
162175 ],
163176 'attributes ' => [
164177 'value ' => $ this ->rolecurrent ,
178+ 'class ' => 'form-control '
165179 ]
166180 ]);
167181
168182 // Add "status" field
169183 $ this ->add ([
170184 'type ' => 'select ' ,
171185 'name ' => 'status ' ,
186+ 'attributes ' => [
187+ 'class ' => 'form-control '
188+ ],
172189 'options ' => [
173190 'label ' => 'Status ' ,
174191 'value_options ' => [
@@ -183,7 +200,8 @@ protected function addElements()
183200 'type ' => 'submit ' ,
184201 'name ' => 'submit ' ,
185202 'attributes ' => [
186- 'value ' => 'Create '
203+ 'value ' => 'Create ' ,
204+ 'class ' => 'btn btn-primary '
187205 ],
188206 ]);
189207 }
0 commit comments