-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Hammers escribió:
> Hello
> 
> I built my own Form (below) but neither the stylesheets nor the JavaScripts
> get included on the final web page. The form widget itself does work fine.
> What did I miss?
> 
>  class ncWidgetFormDynDateTime extends sfWidgetFormInput
>     ...
>     public function getStylesheets()
>     {
>         return array('calendar-system.css' => 'all');
>     }
>     ...
>  }
> 
> And the indexSuccess.php just does a "echo $myform" and the layout.yml has 
> all includes:
>   <head>
>     <?php include_http_metas() ?>
>     <?php include_metas() ?>
>     <?php include_title() ?>
>     <?php include_javascripts(); ?>
>     <?php include_stylesheets(); ?>
>     <link rel="shortcut icon" href="/favicon.ico" />
>   </head>
>   ...
> 
> It does work if I specify each CSS and JS explicitly in view.yml but
> if that's neccessary then getStylesheets() would be pretty useless.
> 
> thanks,
> 
> -christian-
> 
> > 

You'll have to add something like this in your template:

<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

Remember that this should be *only* in the template in which you're
rendering the form, not in *every* template (i.e. your layout).

Best regards,
- --
José Nahuel Cuesta Luengo
Desarrollo | CeSPI - UNLP
<ncue...@cespi.unlp.edu.ar>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqmYJQACgkQ2jTpOyePgAEZ0wCeMCXdXdirmHRLv3D5GQ8EQk45
froAoIV9BYdnUacJBSU/abEwIyEa0/hc
=6oEl
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to