Re: [Catalyst] HTML::FormFu form elements
I've run into a scenario where I need to be able to build an HTML::FormFu form and then only display portions of it in my template. (So, the typical [% form %] in the template will be replaced by something else, at least in my ideal world.) What I do in this context: The template remains untouched. But in my Controller, I manually remove the desired elements: $form-remove_element($form-get_element({ name = 'element_name' })); Jens -- Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] HTML::FormFu form elements
On Thu, 12 Feb 2009 09:38:18 +0100, Jens Schwarz blacky6...@gmx.de wrote: I've run into a scenario where I need to be able to build an HTML::FormFu form and then only display portions of it in my template. (So, the typical [% form %] in the template will be replaced by something else, at least in my ideal world.) What I do in this context: The template remains untouched. But in my Controller, I manually remove the desired elements: $form-remove_element($form-get_element({ name = 'element_name' })); Jens Did you try form.get_all_element()? get_element returns top-level elements, only. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] HTML::FormFu form elements
2009/2/12 Greg Coates gcoa...@csuchico.edu: I've run into a scenario where I need to be able to build an HTML::FormFu form and then only display portions of it in my template. (So, the typical [% form %] in the template will be replaced by something else, at least in my ideal world.) I tried doing this in the template: [% form.get_element('name' = 'element_name') %] I didn't get an error, but it didn't display. Does anyone know if what I'm trying to do is possible, and if so, how to do it? [% form.get_field('name') %] Does exactly what you'd expect. None of the get_* methods die if there's no elements found. Please move any further discussion onto the FormFu mailing list - this has nothing to do with Catalyst - Cheers, Carl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] HTML::FormFu form elements
From: Greg Coates gcoa...@csuchico.edu I've run into a scenario where I need to be able to build an HTML::FormFu form and then only display portions of it in my template. (So, the typical [% form %] in the template will be replaced by something else, at least in my ideal world.) I tried doing this in the template: [% form.get_element('name' = 'element_name') %] I didn't get an error, but it didn't display. Does anyone know if what I'm trying to do is possible, and if so, how to do it? Thanks, Greg Coates Can't you just split the form configuration file in more files, and create another configuration file that loads all those parts? When you will need the entire form you could load the form configuration file that loads all the parts, and when you need just a part of the form, you could load the configuration file that contains that part only. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/