HuyPV
Saturday, November 6, 2010
File: config/generator.yml
form:
display:
NONE: [name, is_active, artist_id, category_id]
Lyric: [lyric]
Others: [slug, url, attributes, priority, singers_list, _huypv]
class: SongAdminForm
fields: { }
File: templates/_huypv.php
<?php #echo $song->getName(); ?>
<input type="text" id="huypv" name="huypv" value="vkl" onclick="alert($('#huypv').val());"/>
File: actions/actions.class.php
class songActions extends autoSongActions
{
protected function processForm(sfWebRequest $request, sfForm $form)
{
$params = $request->getParameter($form->getName());
# overwrite my value
if ($request->getParameter('huypv')) $params['name'] = $request->getParameter('huypv');
$form->bind($params, $request->getFiles($form->getName()));
Title:
Diem, Symfony - Set value for Form field in processForm
Description:
File: config/generator.yml form: display: NONE: [name, is_active, artist_id, category_id] Lyric: [lyric] ...
...
Rating:
4