Reputation: 57
i generated new project in Symfony with very simple schema:
News:
actAs: { Timestampable: ~ }
columns:
title: { type: string(255) }
is_active: { type: string(1) }
In action.class.php in
public function executeIndex(sfWebRequest $request)
i added:
$this->filter = new NewsFormFilter();
and in NewSuccess.php
echo $filter;
now i have form filter, but there aren't data and execute submit. Only clean form. what i have to do that there were data News and work this same as in backhand Jobeet?
Upvotes: 0
Views: 225
Reputation: 1035
You can analyze code generated by symfony's Admin Generator to find out how it works. Generate admin module for your News model by command:
$ symfony doctrine:generate-admin backend News
Open backend in your browser to let symfony generate the cache and then see generated files in folder /cache/backend/modules/autoNews/
(actions and templates).
You may also read the documentation about Admin Generator.
Upvotes: 2
Reputation: 931
The class form generates only field widget. You have to add form tags and submit tag by yourself in template layer.
<form action="<?php echo url_for('contact/submit') ?>" method="POST">
<table>
<?php echo $form ?>
<tr>
<td colspan="2">
<input type="submit" />
</td>
</tr>
</table>
</form>
Upvotes: 1