[symfony-users] Re: Sandbox PR6 - Override Twig in child template

2011-02-14 Thread Lionel Fristot
Finally found it, here what I've done : ## declare 'javascript' in base.html.twig {% block javascript %}{% endblock %} ## in my template {% block javascript %}{% endblock %} On 10 fév, 12:06, LionelFristot wrote: > Hi, > > I'm trying to get this to work without any success : > > {% exte

[symfony-users] Re: How to check if a file exist before uploading it ?

2011-02-11 Thread Lionel Fristot
Maybe you can try the post-validator way : #Add something like that in your Form class protected function checkFile() { $file = $this->getValue('file');//your file input name $dir = $this->getValue('choosen_upload_dir'); if // check if file exists // throw an error (or