Skip to content

Commit

Permalink
Document new form helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 2, 2010
1 parent 74fdec3 commit 2f6ca46
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion howto/en/03 - Add a form on your site.markdown
Expand Up @@ -214,4 +214,26 @@ if ($sf_user->getFlash('contact_form_valid'))
}

// ...the form
[/code]
[/code]

## Include form assets

If your form declares assets in a Diem fashion, like
[code php]
public function getJavascripts()
{
return array(
'core.tabForm',
);
}
[/code]

You should use Diem helpers instead of symfony helpers to include the assets in a template.
[code php]
dm_get_javascripts_for_form() instead of get_javascripts_for_form()
dm_include_javascripts_for_form() instead of include_javascripts_for_form()
dm_get_stylesheets_for_form() instead of get_stylesheets_for_form()
dm_include_stylesheets_for_form() instead of include_stylesheets_for_form()
[/code]

It is only required if you use Diem asset syntax.

0 comments on commit 2f6ca46

Please sign in to comment.