Re: [html-formfu] removing element from the form

2010-07-28 Thread rahed
Carl Franks writes: > I'm not sure what's causing that error message, but I'm not sure that > code's exactly what you want. > remove_element() returns the element that's removed - which in this > case will be stringified and inserted into the template. > > If you don't want the field printed, the

Re: [html-formfu] removing element from the form

2010-07-28 Thread rahed
Benjamin Martin writes: > I think is not working because to remove an element you need to call > remove_element' against the element's 'parent' ... which may not be > "form" > > Try this: > > [% txt = form.get_all_element('field1') %] > [% txt_parent = txt.parent %] > [% txt_parent.remove_element

[html-formfu] removing element from the form

2010-07-27 Thread rahed
Hi, I want to remove a text element from my form. In the template I do: [% txt = form.get_field('field1) %] [% txt.label %] # shows its label, ok [% form.remove_element(txt) %] # shows undef error - element not found What's the right syntax? Thanks. -- Radek

Re: [html-formfu] time_zone with DateTime element

2010-03-31 Thread rahed
Carl Franks writes: > I've added a new method on the Date element (which DateTime > subclasses) that allows you to set values on the DateTime object > before it's used. > See the docs for details. > It's in svn -r1698, and will be in the next CPAN release. Hi, I patched -r1698. When DateTime::F

Re: [html-formfu] time_zone with DateTime element

2010-03-26 Thread rahed
Carl Franks writes: > Hi Radek, > > I wasn't really sure how to create a test case that would work with > `time_zone` as it's not something I've used before. > > If you could either write a new test file - I can fix the Date element > to pass it, > or even just paste your code that's not working,

Re: [html-formfu] time_zone with DateTime element

2010-03-25 Thread rahed
Carl Franks writes: > I've added a new method on the Date element (which DateTime > subclasses) that allows you to set values on the DateTime object > before it's used. > See the docs for details. > It's in svn -r1698, and will be in the next CPAN release. Thanks for a prompt response. I checke

[html-formfu] time_zone with DateTime element

2010-03-25 Thread rahed
Hi, I've got a config file for DateTime element along these lines: elements: - type: DateTime name: date label: From default_natural: now field_order: ['day','month','year','hour'] hour: time_zone: Europe/Berlin I am not able to set a local hour, it's always utc time.

Re: [html-formfu] refresh of the form

2010-03-12 Thread rahed
Carl Franks writes: > I've tested this out with a new Catalyst app, with meta-refresh set to > 10 seconds, with the following form: > > elements: > - name: foo > label: Foo > - type: Submit > name: Submit > > The Controller is empty, so any submitted form will just be > redisplayed, i

Re: [html-formfu] refresh of the form

2010-03-12 Thread rahed
Carl Franks writes: > On 10 March 2010 10:07, rahed wrote: > I don't know why the behaviour is changing when you switch to FormFu - > are there any noticable differences in the outputted HTML? Well, the FormBuilder uses a hidden form field _submitted which is processed in the so

[html-formfu] refresh of the form

2010-03-10 Thread rahed
Hello! I want to replace my FormBuilder and start anew with FormFu. In my template I had: [% FormBuilder.render %] [% IF c.session.refresh %] When I replace FormBuilder with form the form is no longer submitted when there is a refresh. The controller code is like this: sub run : Local : Form