Skip to content

Commit

Permalink
examples: echo $form -> $form->render()
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 3, 2020
1 parent f59c35e commit 8c4ddd1
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion examples/basic-example.php
Expand Up @@ -127,6 +127,6 @@

<h1>Nette Forms basic example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/bootstrap2-rendering.php
Expand Up @@ -93,5 +93,5 @@ function makeBootstrap2(Form $form): void
<h1>Nette Forms & Bootstrap v2 rendering example</h1>
</div>

<?php echo $form ?>
<?php $form->render() ?>
</div>
2 changes: 1 addition & 1 deletion examples/bootstrap3-rendering.php
Expand Up @@ -96,5 +96,5 @@ function makeBootstrap3(Form $form): void
<h1>Nette Forms & Bootstrap v3 rendering example</h1>
</div>

<?php echo $form ?>
<?php $form->render() ?>
</div>
2 changes: 1 addition & 1 deletion examples/bootstrap4-rendering.php
Expand Up @@ -103,5 +103,5 @@ function makeBootstrap4(Form $form): void
<div class="container">
<h1>Nette Forms & Bootstrap v4 rendering example</h1>

<?php echo $form ?>
<?php $form->render() ?>
</div>
2 changes: 1 addition & 1 deletion examples/containers.php
Expand Up @@ -59,6 +59,6 @@

<h1>Nette Forms containers example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/custom-control.php
Expand Up @@ -135,6 +135,6 @@ public static function validateDate(Nette\Forms\IControl $control): bool

<h1>Nette Forms custom control example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/custom-rendering.php
Expand Up @@ -122,6 +122,6 @@

<h1>Nette Forms custom rendering example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/custom-validator.php
Expand Up @@ -59,6 +59,6 @@ public static function divisibilityValidator($item, $arg): bool

<h1>Nette Forms custom validator example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/html5.php
Expand Up @@ -61,6 +61,6 @@

<h1>Nette Forms and HTML5</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/live-validation.php
Expand Up @@ -101,6 +101,6 @@ function removeErrors(elem)

<h1>Nette Forms live validation example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
2 changes: 1 addition & 1 deletion examples/localization.php
Expand Up @@ -84,6 +84,6 @@ public function translate($message, ...$parameters): string

<h1>Nette Forms localization example</h1>

<?php echo $form ?>
<?php $form->render() ?>

<footer><a href="https://doc.nette.org/en/forms">see documentation</a></footer>
18 changes: 9 additions & 9 deletions examples/manual-rendering.php
Expand Up @@ -68,26 +68,26 @@
<legend>Personal data</legend>
<table>
<tr class="required">
<th><?php echo $form['name']->getLabel('Your name:') ?></th>
<td><?php echo $form['name']->control->cols(35) ?> <?php echo $form['name']->error ?></td>
<th><?php $form->render()['name']->getLabel('Your name:') ?></th>
<td><?php $form->render()['name']->control->cols(35) ?> <?php $form->render()['name']->error ?></td>
</tr>
<tr class="required">
<th><?php echo $form['age']->getLabel('Your age:') ?></th>
<td><?php echo $form['age']->control->cols(5) ?> <?php echo $form['age']->error ?></td>
<th><?php $form->render()['age']->getLabel('Your age:') ?></th>
<td><?php $form->render()['age']->control->cols(5) ?> <?php $form->render()['age']->error ?></td>
</tr>
<tr>
<th><?php echo $form['gender']->getLabel('Your gender:') ?></th>
<td><?php echo $form['gender']->control ?> <?php echo $form['gender']->error ?></td>
<th><?php $form->render()['gender']->getLabel('Your gender:') ?></th>
<td><?php $form->render()['gender']->control ?> <?php $form->render()['gender']->error ?></td>
</tr>
<tr>
<th><?php echo $form['email']->getLabel('Email:') ?></th>
<td><?php echo $form['email']->control->cols(35) ?> <?php echo $form['email']->error ?></td>
<th><?php $form->render()['email']->getLabel('Email:') ?></th>
<td><?php $form->render()['email']->control->cols(35) ?> <?php $form->render()['email']->error ?></td>
</tr>
</table>
</fieldset>

<div>
<?php echo $form['submit']->getControl('Send') ?>
<?php $form->render()['submit']->getControl('Send') ?>
</div>

<?php $form->render('end'); ?>
Expand Down
2 changes: 1 addition & 1 deletion tests/Forms/Forms.objectAction.phpt
Expand Up @@ -18,5 +18,5 @@ Assert::noError(function () {
}
});

echo $form;
$form->render();
});

0 comments on commit 8c4ddd1

Please sign in to comment.