|
56 | 56 |
|
57 | 57 | <?php $form->render('begin') ?> |
58 | 58 |
|
59 | | - <?php if ($form->errors) { ?> |
| 59 | + <?php if ($form->errors): ?> |
60 | 60 | <ul class="error"> |
61 | | - <?php foreach ($form->errors as $error) { ?> |
| 61 | + <?php foreach ($form->errors as $error): ?> |
62 | 62 | <li><?php echo htmlspecialchars($error) ?></li> |
63 | | - <?php } ?> |
| 63 | + <?php endforeach ?> |
64 | 64 | </ul> |
65 | | - <?php } ?> |
| 65 | + <?php endif ?> |
66 | 66 |
|
67 | 67 | <fieldset> |
68 | 68 | <legend>Personal data</legend> |
69 | 69 | <table> |
70 | 70 | <tr class="required"> |
71 | | - <th><?php $form->render()['name']->getLabel('Your name:') ?></th> |
72 | | - <td><?php $form->render()['name']->control->cols(35) ?> <?php $form->render()['name']->error ?></td> |
| 71 | + <th><?php echo $form['name']->getLabel('Your name:') ?></th> |
| 72 | + <td><?php echo $form['name']->control->cols(35) ?> <?php echo $form['name']->error ?></td> |
73 | 73 | </tr> |
74 | 74 | <tr class="required"> |
75 | | - <th><?php $form->render()['age']->getLabel('Your age:') ?></th> |
76 | | - <td><?php $form->render()['age']->control->cols(5) ?> <?php $form->render()['age']->error ?></td> |
| 75 | + <th><?php echo $form['age']->getLabel('Your age:') ?></th> |
| 76 | + <td><?php echo $form['age']->control->cols(5) ?> <?php echo $form['age']->error ?></td> |
77 | 77 | </tr> |
78 | 78 | <tr> |
79 | | - <th><?php $form->render()['gender']->getLabel('Your gender:') ?></th> |
80 | | - <td><?php $form->render()['gender']->control ?> <?php $form->render()['gender']->error ?></td> |
| 79 | + <th><?php echo $form['gender']->getLabel('Your gender:') ?></th> |
| 80 | + <td><?php echo $form['gender']->control ?> <?php echo $form['gender']->error ?></td> |
81 | 81 | </tr> |
82 | 82 | <tr> |
83 | | - <th><?php $form->render()['email']->getLabel('Email:') ?></th> |
84 | | - <td><?php $form->render()['email']->control->cols(35) ?> <?php $form->render()['email']->error ?></td> |
| 83 | + <th><?php echo $form['email']->getLabel('Email:') ?></th> |
| 84 | + <td><?php echo $form['email']->control->cols(35) ?> <?php echo $form['email']->error ?></td> |
85 | 85 | </tr> |
86 | 86 | </table> |
87 | 87 | </fieldset> |
88 | 88 |
|
89 | 89 | <div> |
90 | | - <?php $form->render()['submit']->getControl('Send') ?> |
| 90 | + <?php echo $form['submit']->getControl('Send') ?> |
91 | 91 | </div> |
92 | 92 |
|
93 | 93 | <?php $form->render('end'); ?> |
|
0 commit comments