[symfony-users] Multiple Forms on one page ??

2010-10-30 Thread apc...@dsl.pipex.com

I wonder if it is possible to display multiple forms on a web page
using symfony. Each of these forms should have a drop down menu. Each
of the forms is derived from a different table in a database.  Is it
possible to just to have the one send button which will only send data
of the table which has it’s data selected/highlighted.

any help greatly appreciated

Reto

-- 
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] Multiple Forms on one page ??

2010-10-30 Thread Alex Pilon
Yes.. you probably need to use javascript to control form submission.. I
don't have an example off hand however..

On Oct 30, 2010 1:54 PM, apc...@dsl.pipex.com apc...@dsl.pipex.com
wrote:


I wonder if it is possible to display multiple forms on a web page
using symfony. Each of these forms should have a drop down menu. Each
of the forms is derived from a different table in a database.  Is it
possible to just to have the one send button which will only send data
of the table which has it’s data selected/highlighted.

any help greatly appreciated

Reto

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

-- 
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] Multiple Forms on one page ??

2010-10-30 Thread Gareth McCumskey
You don't need to use the automatically generated tables. You can create all
your own forms you need and then only instantiate the form class you need in
the action. So after create for example two forms using the forms framework
(http://www.symfony-project.org/gentle-introduction/1_4/en/10-Forms), in
your action you can do something like:

if (somecondition)
{
  $this-form = new OneForm();
}
else
{
  $this-form = new OtherForm();
}

Then in your template:

form action=?php echo ($form instanceof OneForm) ?  process/OneForm :
process/OtherForm?
?php echo $form ?
input type=Submit value=Submit /
/form

You can even go further but those are the basics. Don't rely on symfony's
auto generation of forms. That system is really only very basic. If you want
the full power of symfony's forms framework readup on that link I provided.

On Sat, Oct 30, 2010 at 7:54 PM, apc...@dsl.pipex.com
apc...@dsl.pipex.comwrote:


 I wonder if it is possible to display multiple forms on a web page
 using symfony. Each of these forms should have a drop down menu. Each
 of the forms is derived from a different table in a database.  Is it
 possible to just to have the one send button which will only send data
 of the table which has it’s data selected/highlighted.

 any help greatly appreciated

 Reto

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




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

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