[symfony-users] Re: How to set trim default option on all widgets in a Form

2010-02-02 Thread DoRiaN
Up please :)

On 1 fév, 17:44, DoRiaN  wrote:
> Hello (i'm french, excuse me for my english),
>
> How to set trim default option on all widgets in a Form ?
>
> Thanks,
> Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] How to set trim default option on all widgets in a Form

2010-02-01 Thread DoRiaN
Hello (i'm french, excuse me for my english),

How to set trim default option on all widgets in a Form ?

Thanks,
Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: array of array

2010-02-01 Thread DoRiaN
I'm sorry, bind it's ok with $oForm->getEmbeddedForm(..)->bind(...)

Is there an alternative?


On 1 fév, 17:23, DoRiaN  wrote:
> Finally, I can't bind with $this->embedForm(), it's not OK.
>
> On 1 fév, 15:16, DoRiaN  wrote:
>
> > With $this->embedForm() it's OK.
>
> > Is there an alternative?
>
> > On 1 fév, 12:33, DoRiaN  wrote:
>
> > > Hello (i'm french excuse me for my englis),
>
> > > I try to use an array in widget name with $this->widgetSchema-
>
> > > >setNameFormat('test[%s]');
>
> > > $this->setWidget('example[0]',  
>
> > > On submit I've :
>
> > > Unexpected extra form field named "example".
>
> > > Thanks,
> > > Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: array of array

2010-02-01 Thread DoRiaN
Finally, I can't bind with $this->embedForm(), it's not OK.

On 1 fév, 15:16, DoRiaN  wrote:
> With $this->embedForm() it's OK.
>
> Is there an alternative?
>
> On 1 fév, 12:33, DoRiaN  wrote:
>
> > Hello (i'm french excuse me for my englis),
>
> > I try to use an array in widget name with $this->widgetSchema-
>
> > >setNameFormat('test[%s]');
>
> > $this->setWidget('example[0]',  
>
> > On submit I've :
>
> > Unexpected extra form field named "example".
>
> > Thanks,
> > Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: array of array

2010-02-01 Thread DoRiaN
With $this->embedForm() it's OK.

Is there an alternative?

On 1 fév, 12:33, DoRiaN  wrote:
> Hello (i'm french excuse me for my englis),
>
> I try to use an array in widget name with $this->widgetSchema-
>
> >setNameFormat('test[%s]');
>
> $this->setWidget('example[0]',  
>
> On submit I've :
>
> Unexpected extra form field named "example".
>
> Thanks,
> Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: sfForm standalone - Upload file with prefix

2010-02-01 Thread DoRiaN
Yes i have >> undefined index in $_FILES. It's logical.

On 1 fév, 14:03, Tom Ptacnik  wrote:
> Have you tried something like
>
> $oFormFile->bind(array(), array('file' => $_FILES
> ['myPrefix_file'])); ?
>
> On 31 led, 23:07, DoRiaN  wrote:
>
> > Up please.
>
> > On 26 jan, 15:47, DoRiaN  wrote:
>
> > > Hello (sorry for my english i'm french),
>
> > > I usesfFormstandalone touploadfile.
>
> > > When i don't useprefixwith
>
> > > >> $this->widgetSchema->setNameFormat(self::PREFIX. '[%s]');
>
> > > I can bind my data with my form
>
> > > >> $oFormFile->bind(array(), array('file' => $_FILES['file']));
>
> > > But when i useprefixlie that :
>
> > > >> $this->widgetSchema->setNameFormat(self::PREFIX. '[%s]');
>
> > > I can't bind my file
>
> > > >> $oFormFile->bind(array(), array('file' => 
> > > >> $_FILES['myPrefix']['file']));
> > > or
> > > >> $oFormFile->bind(array(), array('file' => $_FILES['myPrefix']));
>
> > > I' ve tried to rewrite my array FILES bu no success with
> > >     $file = array();
> > >     if (isset($_FILES[Altays_Form_Manager_TicketOpen::PREFIX]) == true)
> > > {
> > >         foreach ($_FILES[Altays_Form_Manager_TicketOpen::PREFIX] as
> > > $fileAttr => $aFile) {
> > >             foreach ($aFile as $fileName => $fileValue)
> > >                 $file[Altays_Form_Manager_TicketOpen::PREFIX]
> > > [$fileName][$fileAttr] = $fileValue;
> > >         }
> > >     }
>
> > > >> $oFormFile->bind(array(), array('file' => $file));
>
> > > How to bind my file when I use $this->widgetSchema->setNameFormat
> > > (self::PREFIX. '[%s]'); ?
>
> > > Thanks,
> > > Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] array of array

2010-02-01 Thread DoRiaN
Hello (i'm french excuse me for my englis),

I try to use an array in widget name with $this->widgetSchema-
>setNameFormat('test[%s]');

$this->setWidget('example[0]',  

On submit I've :

Unexpected extra form field named "example".

Thanks,
Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: sfForm standalone - Upload file with prefix

2010-01-31 Thread DoRiaN
Up please.

On 26 jan, 15:47, DoRiaN  wrote:
> Hello (sorry for my english i'm french),
>
> I usesfFormstandalone touploadfile.
>
> When i don't useprefixwith
>
> >> $this->widgetSchema->setNameFormat(self::PREFIX. '[%s]');
>
> I can bind my data with my form
>
> >> $oFormFile->bind(array(), array('file' => $_FILES['file']));
>
> But when i useprefixlie that :
>
> >> $this->widgetSchema->setNameFormat(self::PREFIX. '[%s]');
>
> I can't bind my file
>
> >> $oFormFile->bind(array(), array('file' => $_FILES['myPrefix']['file']));
> or
> >> $oFormFile->bind(array(), array('file' => $_FILES['myPrefix']));
>
> I' ve tried to rewrite my array FILES bu no success with
>     $file = array();
>     if (isset($_FILES[Altays_Form_Manager_TicketOpen::PREFIX]) == true)
> {
>         foreach ($_FILES[Altays_Form_Manager_TicketOpen::PREFIX] as
> $fileAttr => $aFile) {
>             foreach ($aFile as $fileName => $fileValue)
>                 $file[Altays_Form_Manager_TicketOpen::PREFIX]
> [$fileName][$fileAttr] = $fileValue;
>         }
>     }
>
> >> $oFormFile->bind(array(), array('file' => $file));
>
> How to bind my file when I use $this->widgetSchema->setNameFormat
> (self::PREFIX. '[%s]'); ?
>
> Thanks,
> Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: sfForm > sfFormField without foreach

2010-01-27 Thread DoRiaN
Thanks, i thought to do that but why there is not solution ?

On 27 jan, 15:40, Bernhard Schussek  wrote:
> That's no problem the form framework can solve for you, it's a
> programmatic problem.
>
> You can either:
>
> 1. Output the fields manually
>
> echo $form['field']
>
> 2. Add conditionals in the loop
>
> foreach ($form as $name => $field)
> {
>   if (in_array($name, array('name', 'address')))
>   {
>     ...
>   }
>   else if ($name != 'foobar')
>   {
>     ...
>   }
>
> }
>
> Bernhard

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] Re: sfForm > sfFormField without foreach

2010-01-27 Thread DoRiaN
No, i want loop.

"Always I need to break my foreach to start a new input template and
loop on last inputs without name or index."

foreach (...)
... break;

Then I want loop again without foreach (because reset).

each() or while (list(, $oWidget) = each($this)) don't work




On 27 jan, 12:13, Gábor Fási  wrote:
> You can access a field directly via `$form["fieldname"]`, if that's
> what you're asking.
>
> On Wed, Jan 27, 2010 at 10:19, DoRiaN  wrote:
> > Hello (i'm french excuse me for my english)
>
> > How to get sfFormField in sfForm withtout foreach ?
>
> > When I use sfForm, I can get all my widget like that
>
> > foreach ($this as $oWidget) {
> > 
> > $oWidget->render()...
> > }
>
> > But i can't to do [B][I]each[/I][/B] or [B][I]while (list(, $oWidget)
> > = each($this))[/I][/B].
>
> > Always I need to break my foreach to start a new input template and
> > loop on last inputs withtout name or index.
>
> > Thanks,
> > Dorian
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > symfony-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] sfForm > sfFormField without foreach

2010-01-27 Thread DoRiaN
Hello (i'm french excuse me for my english)

How to get sfFormField in sfForm withtout foreach ?

When I use sfForm, I can get all my widget like that

foreach ($this as $oWidget) {

$oWidget->render()...
}

But i can't to do [B][I]each[/I][/B] or [B][I]while (list(, $oWidget)
= each($this))[/I][/B].

Always I need to break my foreach to start a new input template and
loop on last inputs withtout name or index.

Thanks,
Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] sfForm standalone - Upload file with prefix

2010-01-26 Thread DoRiaN
Hello (sorry for my english i'm french),

I use sfForm standalone to upload file.

When i don't use prefix with
>> $this->widgetSchema->setNameFormat(self::PREFIX . '[%s]');

I can bind my data with my form
>> $oFormFile->bind(array(), array('file' => $_FILES['file']));

But when i use prefix lie that :
>> $this->widgetSchema->setNameFormat(self::PREFIX . '[%s]');

I can't bind my file
>> $oFormFile->bind(array(), array('file' => $_FILES['myPrefix']['file']));
or
>> $oFormFile->bind(array(), array('file' => $_FILES['myPrefix']));


I' ve tried to rewrite my array FILES bu no success with
$file = array();
if (isset($_FILES[Altays_Form_Manager_TicketOpen::PREFIX]) == true)
{
foreach ($_FILES[Altays_Form_Manager_TicketOpen::PREFIX] as
$fileAttr => $aFile) {
foreach ($aFile as $fileName => $fileValue)
$file[Altays_Form_Manager_TicketOpen::PREFIX]
[$fileName][$fileAttr] = $fileValue;
    }
}

>> $oFormFile->bind(array(), array('file' => $file));


How to bind my file when I use $this->widgetSchema->setNameFormat
(self::PREFIX . '[%s]'); ?

Thanks,
Dorian

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.



[symfony-users] execute setPostValidator

2010-01-18 Thread DoRiaN
Hello (i'm french excuse me for my englise),

Is it possible to execute setPostValidator() only if others validators
are valids ?

Thanks,
Dorian
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




[symfony-users] Re: sfForm clean bind

2010-01-18 Thread DoRiaN
Ok there are lot of solutions, buf does sfForm have a method to this ?

On 15 jan, 14:39, Tom Ptacnik  wrote:
> If you want to clear the form after it's proccessed, you can simply do
> redirect to the same form (in the action)
>
> On 15 led, 12:23,DoRiaN wrote:
>
> > Hello,
>
> > How to delete values after bind() ?
> > I want to clean my form.
>
> > Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




[symfony-users] Re: sfForm clean bind

2010-01-15 Thread DoRiaN
When the form isValid(), i display again the same form empty to add a
new element.

I do new Form because i don't know how to clean values.


On 15 jan, 14:27, ken  wrote:
> What's your purpose of clearing the form of its values?
>
> On Jan 15, 7:23 pm, DoRiaN  wrote:
>
> > Hello,
>
> > How to delete values after bind() ?
> > I want to clean my form.
>
> > Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




[symfony-users] sfForm clean bind

2010-01-15 Thread DoRiaN
Hello,

How to delete values after bind() ?
I want to clean my form.

Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




[symfony-users] How to enable plugin standalone

2010-01-13 Thread DoRiaN
Hello (i'm french, excuse me for my english),

I work with sfForm standalone.
I would like to enable sfDoctrinePlugin ?
Is it possible ? How to do ?

Thank you,
Dorian
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.