[symfony-users] Re: subform update when other widget changes

2010-03-08 Thread Tom Ptacnik
You can use ajax. Unfortunately I'm not good at ajax, so I can't help
you with the exact code.

Try to find more informations about ajax.


On 6 bře, 04:37, Abraham amontil...@gmail.com wrote:
 Hi all, is there a way to update a subform when the selected value in
 a sfWidgetFormDoctrineChoice changes?

 I'm using javascript onChange, however, i need to create a doctrine
 query with the selected value, and is not possible to pass javascript
 vars to PHP.

 Any ideas to overcome this? Thanks.

-- 
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] Re: subform update when other widget changes

2010-03-08 Thread Richtermeister
This is somewhat tricky, and I haven't quite figured out a good way
either.

Of course you'll need some form of ajax to get new widgets from the
server, but you'll also need to tell the main form that you've just
added new fields, otherwise it'll complain about unexpected values.

For complex field interaction I would look into ajax frameworks such
as ExtJs, which should play rather nicely with symfony (request json
data, etc.). However, ExtJs comes with its own form system on board,
so using symfony forms is rather redundant in this case..

Tricky subject. Would like to hear more on this as well.

Daniel



On Mar 7, 3:52 pm, Abraham Montilla amontil...@gmail.com wrote:
 somebody?

 2010/3/5 Abraham amontil...@gmail.com

  Hi all, is there a way to update a subform when the selected value in
  a sfWidgetFormDoctrineChoice changes?

  I'm using javascript onChange, however, i need to create a doctrine
  query with the selected value, and is not possible to pass javascript
  vars to PHP.

  Any ideas to overcome this? Thanks.

 --
 Have a nice day.
 Abraham Montilla.

-- 
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] Re: subform update when other widget changes

2010-03-08 Thread Abraham Montilla
i found a way using ajax (observe_field)... As the author says, is not the
best solution, but really works.

this is the link:

http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/

thanks for your answers guys.

2010/3/8 Richtermeister nex...@gmail.com

 This is somewhat tricky, and I haven't quite figured out a good way
 either.

 Of course you'll need some form of ajax to get new widgets from the
 server, but you'll also need to tell the main form that you've just
 added new fields, otherwise it'll complain about unexpected values.

 For complex field interaction I would look into ajax frameworks such
 as ExtJs, which should play rather nicely with symfony (request json
 data, etc.). However, ExtJs comes with its own form system on board,
 so using symfony forms is rather redundant in this case..

 Tricky subject. Would like to hear more on this as well.

 Daniel



 On Mar 7, 3:52 pm, Abraham Montilla amontil...@gmail.com wrote:
  somebody?
 
  2010/3/5 Abraham amontil...@gmail.com
 
   Hi all, is there a way to update a subform when the selected value in
   a sfWidgetFormDoctrineChoice changes?
 
   I'm using javascript onChange, however, i need to create a doctrine
   query with the selected value, and is not possible to pass javascript
   vars to PHP.
 
   Any ideas to overcome this? Thanks.
 
  --
  Have a nice day.
  Abraham Montilla.

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Have a nice day.
Abraham Montilla.

-- 
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] Re: subform update when other widget changes

2010-03-07 Thread Abraham Montilla
somebody?

2010/3/5 Abraham amontil...@gmail.com

 Hi all, is there a way to update a subform when the selected value in
 a sfWidgetFormDoctrineChoice changes?

 I'm using javascript onChange, however, i need to create a doctrine
 query with the selected value, and is not possible to pass javascript
 vars to PHP.

 Any ideas to overcome this? Thanks.




-- 
Have a nice day.
Abraham Montilla.

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