[symfony-users] Re: Forms & Entities with Association Mappings

2011-06-17 Thread Aaron DM
Whoa that's it! Thanks, not sure how I missed that - I even looked over the documentation :S -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" gr

[symfony-users] Re: Forms & Entities with Association Mappings

2011-06-17 Thread Grégoire
I think you should create a separate form for Address entity and embed it in the user form, see http://symfony.com/doc/current/book/forms.html#embedded-forms On 16 juin, 19:31, Aaron DM wrote: > Hello, > > I was wondering how I would accomplish this. > > I want to create a single FormType for th

[symfony-users] Re: Forms and Entity Annotation Validation...

2011-04-12 Thread spike3111
In your code you use @validation, but now it's @assert Example from http://symfony.com/doc/2.0/book/validation.html // Acme/BlogBundle/Author.php class Author { /** * @assert:Choice({"male", "female"}) */ protected $gender; } On 12 avr, 12:45, kassel wrote: > Hi, as i undertood

[symfony-users] Re: Forms and Entity Annotation Validation...

2011-04-12 Thread kassel
Hi, as i undertood i've got the same problem, the annotations dont wark, and even email work. Any idea Thanks On 18 mar, 00:02, j_stout wrote: > Basically I just got a small understanding on a service, but still no > clue how they pertain to forms.  Also there is no documentation on > adding val

[symfony-users] Re: Forms escaping quotes on input

2011-04-11 Thread Richtermeister
Could this be related to the php setting "magic quotes"? Daniel On Apr 10, 11:47 am, Simon Cast wrote: > I recently upgraded to 1.4.12 and this has produced the odd error > where form input is escaping quotes on entry to the system. By this I > mean I echoed the clean & bound form and the text f

[symfony-users] Re: Forms and Entity Annotation Validation...

2011-03-17 Thread j_stout
Basically I just got a small understanding on a service, but still no clue how they pertain to forms. Also there is no documentation on adding validation groups via Entity Annotations, so hopefully all these things get solved one day. So if someone can guide me on how to do validation inside the

[symfony-users] Re: Forms and validation

2011-02-17 Thread Lideln
Hi ! I fixed the issue by removing my lame ctor and passing the name parameter to the create() factory instead as advised. Thank you all ! On 16 fév, 10:51, Bernhard Schussek wrote: > Oops, parentheses I mean. > > /** @validation:NotNull */ > and > /** @validation:NotNull() */ > > both are val

Re: [symfony-users] Re: Forms and validation

2011-02-16 Thread Bernhard Schussek
Oops, parentheses I mean. /** @validation:NotNull */ and /** @validation:NotNull() */ both are valid. Bernhard -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Group

[symfony-users] Re: Forms and validation

2011-02-16 Thread Lideln
Hi, I did not understand the "parent" thing ? Is there something wrong with my code ? I hope so, otherwise I would not understand why I got this error :-/ On 16 fév, 00:27, Bernhard Schussek wrote: > > Correct syntax for annotation-validators is to use parents in the end: > > email(), NotBlank()

[symfony-users] Re: Forms and validation

2011-02-16 Thread Lideln
On 16 fév, 00:27, Bernhard Schussek wrote: > > Correct syntax for annotation-validators is to use parents in the end: > > email(), NotBlank()... > > This is not true. You can leave away the parents just as well. > > Bernhard Sorry what do you guys mean by parents ? Is there something wrong with

Re: [symfony-users] Re: Forms and validation

2011-02-15 Thread Bernhard Schussek
> Correct syntax for annotation-validators is to use parents in the end: > email(), NotBlank()... This is not true. You can leave away the parents just as well. Bernhard -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received t

[symfony-users] Re: Forms and validation

2011-02-15 Thread Nikita Korotaev
Instead of using constructor, add a name in Create function: $oForm = RegisterForm::create($this->get('form.context'), "Registration"); Correct syntax for annotation-validators is to use parents in the end: email(), NotBlank()... In all other cases your code seems to be valid. Your entity class d

[symfony-users] Re: Forms and validation

2011-02-15 Thread Lideln
Hi Nikita, Thanks for the answer. I had already discovered the form name parameter. Only I fixed it by creating a ctor in my form and calling parent::__construct('register'). The topic you kindly gave me did not help. I still have the " The option "validator" is required for validating " error. J

[symfony-users] Re: Forms and validation

2011-02-15 Thread Lideln
Hi Nikita, Yes I already discovered the missing name by myself and added a __construct() in my RegisterForm class, that is calling parent::__construct('register') and it works fine. But the validators don't work, I got this strange error as if a Validation instance does not exist in the context ($

[symfony-users] Re: Forms and validation

2011-02-15 Thread Justin Fortier
There used to be an email field from what I've heard, but it's redundant because of the textfield. The only reason the url field is there, is because you can set it up for different protocols. On Feb 15, 11:23 am, Nikita Korotaev wrote: > There is no such thing like EmailField at the moment, I do

[symfony-users] Re: Forms issue: Unknown "required" field

2010-03-03 Thread Trung Huynh
Holy crap. Forgive my noobishness . -.-' On Mar 3, 11:07 am, Tugdual SAUNIER wrote: > You define a field "type" here: > > $this->validatorSchema['type'] = new sfValidatorChoice(array( >        'choices' => array_keys(Doctrine_Core:: > getTable('member')->getStates()), > >        )); > > I guess i

[symfony-users] Re: Forms howto symfony 1.4

2010-02-24 Thread Massimiliano Arione
http://www.symfony-project.org/forms/1_4/ On 22 Feb, 20:49, Diego Bello wrote: > Hi guys, > > Is there any documentation about how to use forms in symfony 1.4?. > What I want to do is to change a field from text input to select. > > I tried rewritting the form putting the new content in > lib/for

[symfony-users] Re: Forms howto symfony 1.4

2010-02-23 Thread Tom Ptacnik
There are so much documentation of what you want to do On 22 ún, 20:49, Diego Bello wrote: > Hi guys, > > Is there any documentation about how to use forms in symfony 1.4?. > What I want to do is to change a field from text input to select. > > I tried rewritting the form putting the new con

[symfony-users] Re: Forms howto symfony 1.4

2010-02-22 Thread rooster (Russ)
The definitive guide will be released (under a different name) some point soon, in the meantime - the forms docs for 1.2 are pretty much the same so give those a whirl! Check out Appendix A and B (widgets and validators) any you can't go far wrong. Russ. On Feb 22, 2:49 pm, Diego Bello wrote: >

[symfony-users] Re: Forms - a mini survey

2009-11-19 Thread Dennis
Well, no one likes to tag onto a 'whining' post. I shouldn't be surprised :-) When I'm rich, (because of using symfony), I will hire somebody to produce 'database mentality' documentation. (See Postgres docs, or Oracle docs) On Nov 12, 8:40 pm, Dennis wrote: > I have had nothing but grief when i

[symfony-users] Re: Forms

2009-08-24 Thread NairuS
009/8/24 NairuS > Hello, > Yes I do this method for display severals forms in the same view, if your > schema allowed that. > But I don't know how to override the labels of my embedded form's fields ? > It is possible ? > forget my question, I found the solution here: http://www.symfony-project.o

[symfony-users] Re: Forms

2009-08-24 Thread NairuS
Hello, Yes I do this method for display severals forms in the same view, if your schema allowed that. But I don't know how to override the labels of my embedded form's fields ? It is possible ? With the admin-generator I was able to change only the labels of the main form. Thanks NairuS 2009/8/6 M

[symfony-users] Re: [FORMS] Merge forms in backend

2009-08-19 Thread Donald Tyler
I think most people (including myself) are going to have a very hard time understanding what you are asking here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send ema

[symfony-users] Re: Forms

2009-08-06 Thread Martin Ibarra Cervantes
you can embebed a form and with unset(); in lib/form you can disabled the fields in the function configure(). On Tue, Aug 4, 2009 at 9:07 AM, Richtermeister wrote: > > Hi juaninf, > > you cannot auto-generate forms that span more than 1 table. > However, once all forms are generated, you can emb

[symfony-users] Re: Forms

2009-08-04 Thread Richtermeister
Hi juaninf, you cannot auto-generate forms that span more than 1 table. However, once all forms are generated, you can embed one inside the other via the embedForm() method. Hope this helps. Daniel On Aug 3, 3:12 pm, juaninf wrote: > I know that the php symfony propel:build-forms command gene

[symfony-users] Re: Forms in backend - admin doesn't get build on the /lib/form/*.class.php model?

2009-07-16 Thread Richtermeister
Hey Tommaso, you're saying the code never executes? Like, the configure method never gets called? Well, that's an issue ;) Is that really the class that extends the Base Model class that the admin generator is working with? (look at the admin generator.yml for the model class it generates for).

[symfony-users] Re: Forms in backend - admin doesn't get build on the /lib/form/*.class.php model?

2009-07-16 Thread Tommaso D'Argenio
Hi Daniel, thanks for replying. I understand the /lib/form are the classes which can be used to override and customize the generator.yml. So now how can you help me? My BlogPostForm.class.php contains the following tweak: public function configure() { //$this->setWidgets(array('body' => new

[symfony-users] Re: Forms in backend - admin doesn't get build on the /lib/form/*.class.php model?

2009-07-15 Thread Richtermeister
Hey Tommaso, the admin generator does use the form classes in /lib/form. The generator.yml is a fairly superficial layer of control over which fields get displayed in which order with which labels, etc.. but it is the form class itself where you want to make the major modifications, like swapping

[symfony-users] Re: Forms in backend - admin doesn't get build on the /lib/form/*.class.php model?

2009-07-15 Thread Tommaso D'Argenio
Hi, thanks for your reply. So backend form are solely generated from the module's generator.yml? If so (because I've got different point of view on this, and also in the book and plugin guides it is said to touch the form class also) then the ExtraFormPlugin is not well designed as it doesn't al

[symfony-users] Re: Forms: isValid() == true, isBound() == true, but getValues() == null???

2009-03-24 Thread Sid Bachtiar
Can we see your form source code? It would be easier. > What's even more strange is that I can gain access to each value > individually like this: > $form['value_name']->getValue() What is so strange about that? It's a feature of PHP5, check http://php.oregonstate.edu/manual/en/class.arrayaccess

[symfony-users] Re: Forms: isValid() == true, isBound() == true, but getValues() == null???

2009-03-24 Thread Nickolas Daskalou
I found the problem. I had created a custom post validator like this: class sfValidatorFoo extends sfValidatorBase { public function doClean($value) { } } and because it doesn't return anything (null), all values were getting filtered out. It works when I add this single line in the doClean

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-20 Thread shahin
i think the best solution is told by Richtermeister the use of session seemed to be only solution for this but if you want use symfony power you can use flash mechanism by setting second argument of it to 3 this mean flash data must be expired after three successively request but be cautious the

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-20 Thread Gareth McCumskey
Using ajax watches on the fields (observe_field) I then passed the values that were being entered to a validation action to run validation using the base validation rules symfony has for things like email etc and then only allowing the "Next" button to become visible once no errors were generated.

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-19 Thread Ant Cunningham
Well he is only talking about hiding/showing elements, not actually adding elements via AJAX requests. So in theory you could for example collect all the element id's with errors and then show those elements as opposed to the inital state of the form. Note i havent actually done this, it was j

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-19 Thread John Masson
Hi Gareth, How do you go about doing validation on such a form? I've tried in the past (admittedly only in 1.0) to do AJAX based forms mainly relying on the observe_field tag acting on various drop downs or checkboxes to populate hidden divs with new form fields based on what the user is selectin

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-19 Thread Gareth McCumskey
Or you could do what we did and make all three forms into one large form and just use the prototype/scriptaculous effects to move from the "1st form" to the "2nd form" by hiding and displaying the form widgets at specific times or hiding and displaying the divs the form widgets are in. On 2/19/09,

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-19 Thread Richtermeister
Hi Justin, alternatively you really treat each form individually, and save the valid data in the session each time, only forwarding to the next form when the required data has been entered. At the last form you save all to the database. I find that these kind of process flows often need so much c

[symfony-users] Re: Forms over multiple pages, save at the end?

2009-02-19 Thread Rimenes Ribeiro
Hi Justin, Take a look at this plugin. It's for symfony 1.0 http://raw.trac.symfony-project.org/wiki/sfPageFlowPlugin It doesn't seem to be maintained anymore. If you can't use it, at least it can inspire you to solve your problem. regards, Rimenes Ribeiro. 2009/2/18 Justin Davis > Hey all - >

[symfony-users] Re: Forms questions

2008-12-16 Thread Peter Bowyer
Hi Bernhard, At 12:03 16/12/2008, Bernhard Schussek wrote: >First of all you need to understand that > > > >was never meant to replace custom styling. If you want to customize >the structure, CSS classes or other attributes of the generated HTML, >you need to do it manually in the template.

[symfony-users] Re: Forms questions

2008-12-16 Thread Bernhard Schussek
Hi Peter, First of all you need to understand that was never meant to replace custom styling. If you want to customize the structure, CSS classes or other attributes of the generated HTML, you need to do it manually in the template. After all, this is template logic, and as such belongs th

[symfony-users] Re: Forms in Symfony

2008-06-17 Thread Joao
In Symfony 1.1 is easy, after declaring the form in actions.class.php set the default value for the field you want to set. $this->form = new FormXPTZ(); $this->form->setDefault('country','PT'); On Jun 17, 4:02 pm, Jacob Coby <[EMAIL PROTECTED]> wrote: > You can pass an array for $selected t

[symfony-users] Re: Forms in Symfony

2008-06-17 Thread Jacob Coby
You can pass an array for $selected to options_for_select(). Populate that array with whatever you want to be selected initially. Or you can write 2 lines of javascript to select all on the client side. On Jun 17, 2008, at 10:42 AM, Dean Farrell wrote: > > > Hello all, > > I'm not te

[symfony-users] Re: Forms API

2007-09-24 Thread Davert
Hello Tristan, Monday, September 24, 2007, 6:28:39 PM, you wrote: > On 9/24/07, Davert <[EMAIL PROTECTED]> wrote: >> Yep, but I didn't recieved an answer to my problem with this plugin. > actually, you did : > http://groups.google.com/group/symfony-users/browse_thread/thread/92ba465eaab59244

[symfony-users] Re: Forms API

2007-09-24 Thread Tristan Rivoallan
On 9/24/07, Davert <[EMAIL PROTECTED]> wrote: > Yep, but I didn't recieved an answer to my problem with this plugin. actually, you did : http://groups.google.com/group/symfony-users/browse_thread/thread/92ba465eaab59244 > It uses sfCollapseble class. It never appears in the code of plugin or Sy

[symfony-users] Re: Forms API

2007-09-24 Thread Davert
Hello Tristan, Monday, September 24, 2007, 11:54:06 AM, you wrote: > hi, > On 9/22/07, Jack Bates <[EMAIL PROTECTED]> wrote: >> Is there anything like the Drupal Forms API for symfony? For >> programmatically writing standards accessible forms? Thanks, Jack > this may help : > http://trac.sym

[symfony-users] Re: Forms API

2007-09-24 Thread Tristan Rivoallan
hi, On 9/22/07, Jack Bates <[EMAIL PROTECTED]> wrote: > Is there anything like the Drupal Forms API for symfony? For > programmatically writing standards accessible forms? Thanks, Jack this may help : http://trac.symfony-project.com/trac/wiki/sfFormBuilderPlugin ++ tristan --~--~-~--~

[symfony-users] Re: Forms with pictures

2007-09-06 Thread Francois Zaninotto
Hi, You might give a look to Flash, which allows for multiple file uploads, progression bar, and more. http://robrosenbaum.com/flash/using-flash-upload-with-php-symfony/ http://www.masrizal.com/product/custom%20tag/cf_flashmultiupload/docs%20&%20examples/example.cfm François 2007/9/5, Cacho <