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
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
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
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
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,
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
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.
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
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
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
10 matches
Mail list logo