[symfony-users] sfWidgetFormSelectDoubleList always required

2011-05-13 Thread filip11
Hi,

I am trying to use sfWidgetFormSelectDoubleList but always having
required error altough I am picking some rows. I am doing like this:

  $choices = $this-prepareMailingList();

  $widget = new sfWidgetFormChoice(array(
'expanded' = true,
'multiple' = true,
'choices'  = $choices,
'renderer_class' = 'sfWidgetFormSelectDoubleList'
  ));
  $widget-setLabel('Odbiorcy');
  $this-setWidget('receivers', $widget);

  $validator = new
sfValidatorChoice(array('choices'=array_keys($choices),'multiple' =
true), array());
  $this-setValidator('receivers', $validator);

thx in advice

Gabe

-- 
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 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


[symfony-users] sfWidgetFormSelectDoubleList

2010-11-27 Thread emanu.ti
Hi all,
I use Symfony 1.4

I want to configure a select double list using
sfWidgetFormSelectDoubleList.
My question:
  - How can a configure the ASSOCIATED items?
To the widget's constructor I give the possible options via
'choices' option, ok. But what about the selected defaults?
I figured out that the FormField's '$value' property holds
the array of associated items, but where can I set this?
I really don't wan't to make field's $value public and set
this in my input template... ;-)
Can anyone help me out? Thanks!

this is my code:
'codecs_list' = $this-widgetSchema['codecs_list']
-setOption('renderer_class',
'sfWidgetFormSelectDoubleList')
-setOption('order_by',
array('id', 'asc'))
-
setOption('renderer_options' , array('label_unassociated' =
'Desativados',
 
'label_associated' = 'Ativados',
 
'associated_first' = false))

On this context, where i can include default values to associated
select??

-- 
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 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


Re: [symfony-users] sfWidgetFormSelectDoubleList order of items?

2010-04-14 Thread Tom Haskins-Vaughan
How do you see this working from a user's point of view? What order is
supposed to be recorded? I mean how do you anticipate telling the form
the correct order? Would it not be better to do the songs for one gig
at a time and just click to add a song in the order which you want to
store them. You could use Ajax to speed things up a bit.

On Mon, Apr 12, 2010 at 12:16 PM, Robert Heim sa...@gmx.net wrote:
 any hints or tipps? :-/

 Am 09.04.2010 14:45, schrieb comb:

 Hi

 I have a many-To-many (Gig-Song) relation and want to use
 sfWidgetFormSelectDoubleList.
 It work's fine, but I want to save the order of assignments, too (and
 not only associated /unassociated ).


 schema.yml:
 # many-To-many-relation
 ...
 GigSong:
   columns:
     order_id: { type: integer, notnull: true, default: 0 }
     gig_id:  { type: integer, primary: true }
     song_id: { type: integer, primary: true }
 ...

 As you see I have an order_id. I want to use this field to determine
 the ordering of played songs on a gig.

 How can I save the order in which I associated the songs to a gig
 using the sfWidgetFormSelectDoubleList? Or what may I do alternatively?



 --
 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 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

 To unsubscribe, reply using remove me as the subject.


-- 
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 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


Re: [symfony-users] sfWidgetFormSelectDoubleList order of items?

2010-04-13 Thread Robert Heim

any hints or tipps? :-/

Am 09.04.2010 14:45, schrieb comb:

Hi

I have a many-To-many (Gig-Song) relation and want to use
sfWidgetFormSelectDoubleList.
It work's fine, but I want to save the order of assignments, too (and
not only associated /unassociated ).


schema.yml:
# many-To-many-relation
...
GigSong:
   columns:
 order_id: { type: integer, notnull: true, default: 0 }
 gig_id:  { type: integer, primary: true }
 song_id: { type: integer, primary: true }
...

As you see I have an order_id. I want to use this field to determine
the ordering of played songs on a gig.

How can I save the order in which I associated the songs to a gig
using the sfWidgetFormSelectDoubleList? Or what may I do alternatively?




--
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 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

To unsubscribe, reply using remove me as the subject.


[symfony-users] sfWidgetFormSelectDoubleList order of items?

2010-04-09 Thread comb
Hi

I have a many-To-many (Gig-Song) relation and want to use
sfWidgetFormSelectDoubleList.
It work's fine, but I want to save the order of assignments, too (and
not only associated /unassociated ).


schema.yml:
# many-To-many-relation
...
GigSong:
  columns:
order_id: { type: integer, notnull: true, default: 0 }
gig_id:  { type: integer, primary: true }
song_id: { type: integer, primary: true }
...

As you see I have an order_id. I want to use this field to determine
the ordering of played songs on a gig.

How can I save the order in which I associated the songs to a gig
using the sfWidgetFormSelectDoubleList? Or what may I do alternatively?

-- 
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 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

To unsubscribe, reply using remove me as the subject.


[symfony-users] sfWidgetFormSelectDoubleList question

2009-06-05 Thread jp


Hi all,

I (still) use Symfony 1.0 and I use the form classes
 from the 1.1 branch in it.

Now I want to configure a select double list using
sfWidgetFormSelectDoubleList.

My question:

  - How can a configure the ASSOCIATED items?

To the widget's constructor I give the possible options via
'choices' option, ok. But what about the selected defaults?

I figured out that the FormField's '$value' property holds
the array of associated items, but where can I set this?

I really don't wan't to make field's $value public and set
this in my input template... ;-)


Can anyone help me out? Thanks!

jp

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] sfWidgetFormSelectDoubleList and ajax

2009-03-09 Thread maestro

Greetings all,

I'd appreciate some help on the following. I have a problem using
sfWidgetFormSelectDoubleList from the sfFormExtraPlugin plugin on a
form that uses jq_submit_to_remote. sfWidgetFormSelectDoubleList uses
a javascript, that hooks on the submit event, that select the items in
the associated select box before doing the submission. Now, the
problem is, with jq_submit_to_remote there is no firing of onsubmit
event (correct me if am wrong) hence no firing of the
sfWidgetFormSelectDoubleList function. Can we say that this widget is
not meant to be used with remote submit? Is there a work around this?

I tried to modify the js to this, but it doesn't work due to the order
in which the event listeners are called. Any help would be
appreciated.

I find the plugin pretty useful but I feel that it can use some more
work to realize its full potential.

cheers,


var sfDoubleList =
{
  init: function(id, className, ajax_submit)
  {
form = sfDoubleList.get_current_form(id);
if(ajax_submit)
{
  //doesn't work on ajax submit where there is no actual submit
event
  //get submit button element
  submit_button = sfDoubleList.get_submit(form);
}

callback = function() {sfDoubleList.submit(form, className); };

if(ajax_submit)
{
  elem = submit_button;
  event_name = click;
}  else {
  elem = form;
  event_name = submit;
}

if (elem.addEventListener)
{
  elem.addEventListener(event_name , callback, false);
}
else if (elem.attachEvent)
{
  var r = elem.attachEvent(on+event_name, callback);
}
  },


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] sfWidgetFormSelectDoubleList problem.

2009-03-03 Thread Meher

Hello,
I'm trying to use your : sfWidgetFormSelectDoubleList  from the
sfFormExtraPlugin...

I downloaded the plugin manually .. and copied the folder in the
plugins folder in my project ..
it seems to be working ... i can initialize the plugin by filling the
choices array

my two questions are :

i can't see the buttons and i can execute the js script .. it's seems
to be something wrong in the path of the plugin ...
i want to know how can i initialise the associated list with another
array...

thank you for answering ..
ps : i'm using Windows Xp ( i didn't installer the pear for
windows ) to run the symfony plugin::install command.
thank you again

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---