FAQ
My problem with FormBuilder and Template Toolkit :

[% form.render %]
works

[% FOREACH f IN form.fields %]
[% f.label %]
[% f.field %]
[% END %]
works

[% form.field.<fieldname>.field %]
does not work

The same problem was signaled a year ago under de subject
"CC::Formbuilder woes".
A solution was posted :
Actually, it _was_ a stash issue, but all down to my misuse of it! Once
I used the correct term for it (default = formbuilder), or over-rode it
with the Controller::FormBuilder config entry stash_name =>
something_else, it worked fine. Thanks for the pointer.
My problem : I just don't get it.
the default for stash_name is formbuilder. Does this mean that
[% formbuilder.field.<fieldname>.field %]
ought to work ? It doesn't.
Or else, what should I override it with ? with 'form' ? No luck either.

Maybe someone more knowledgeable than me might be able to help me.

--
Piet Ruyssinck

Search Discussions

  • Peter Sørensen at Apr 17, 2008 at 6:47 am
    Hi,

    I had the same problem a few months ago and was advised to change the
    stash_name from the default. So I have the following:

    __PACKAGE__->config( name =>'YourApplicationName',
    'Controller::FormBuilder' => {
    method_name => 'form',
    attr_name => 'Form',
    obj_name => 'form',
    stash_name => 'fb',
    }
    .....

    };

    Then in the template:

    [% fb.field.<fieldname>.field %]


    I haven't figured out why I had to change this name but try.


    Regards

    Peter S?rensen/University of Southern Denmark/mail: maspsr@sdu.dk

    -----Oprindelig meddelelse-----
    Fra: Piet Ruyssinck
    Sendt: 12. april 2008 21:30
    Til: catalyst@lists.scsys.co.uk
    Emne: [Catalyst] CC::FormBuilder woes - I don't get it

    My problem with FormBuilder and Template Toolkit :

    [% form.render %]
    works

    [% FOREACH f IN form.fields %]
    [% f.label %]
    [% f.field %]
    [% END %]
    works
    y.
    [% form.field.<fieldname>.field %]
    does not work

    The same problem was signaled a year ago under de subject "CC::Formbuilder woes".
    A solution was posted :
    Actually, it _was_ a stash issue, but all down to my misuse of it!
    Once I used the correct term for it (default = formbuilder), or
    over-rode it with the Controller::FormBuilder config entry stash_name
    => something_else, it worked fine. Thanks for the pointer.
    My problem : I just don't get it.
    the default for stash_name is formbuilder. Does this mean that [% formbuilder.field.<fieldname>.field %] ought to work ? It doesn't.
    Or else, what should I override it with ? with 'form' ? No luck either.

    Maybe someone more knowledgeable than me might be able to help me.

    --
    Piet Ruyssinck

    _______________________________________________
    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/
  • Piet Ruyssinck at Apr 17, 2008 at 9:04 pm
    Thanks for the hint, but unfortunately that still doesn't work.

    Piet.

    On Thu, Apr 17, 2008 at 7:47 AM, Peter S?rensen wrote:
    Hi,

    I had the same problem a few months ago and was advised to change the
    stash_name from the default. So I have the following:

    __PACKAGE__->config( name =>'YourApplicationName',
    'Controller::FormBuilder' => {
    method_name => 'form',
    attr_name => 'Form',
    obj_name => 'form',
    stash_name => 'fb',
    }
    .....

    };

    Then in the template:

    [% fb.field.<fieldname>.field %]


    I haven't figured out why I had to change this name but try.


    Regards

    Peter S?rensen/University of Southern Denmark/mail: maspsr@sdu.dk

    -----Oprindelig meddelelse-----
    Fra: Piet Ruyssinck
    Sendt: 12. april 2008 21:30
    Til: catalyst@lists.scsys.co.uk
    Emne: [Catalyst] CC::FormBuilder woes - I don't get it


    My problem with FormBuilder and Template Toolkit :

    [% form.render %]
    works

    [% FOREACH f IN form.fields %]
    [% f.label %]
    [% f.field %]
    [% END %]
    works
    y.

    [% form.field.<fieldname>.field %]
    does not work

    The same problem was signaled a year ago under de subject "CC::Formbuilder woes".
    A solution was posted :
    Actually, it _was_ a stash issue, but all down to my misuse of it!
    Once I used the correct term for it (default = formbuilder), or
    over-rode it with the Controller::FormBuilder config entry stash_name
    => something_else, it worked fine. Thanks for the pointer.
    My problem : I just don't get it.
    the default for stash_name is formbuilder. Does this mean that [% formbuilder.field.<fieldname>.field %] ought to work ? It doesn't.
    Or else, what should I override it with ? with 'form' ? No luck either.

    Maybe someone more knowledgeable than me might be able to help me.

    --
    Piet Ruyssinck



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

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


    --
    Piet Ruyssinck

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 12, '08 at 8:29p
activeApr 17, '08 at 9:04p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Piet Ruyssinck: 2 posts Peter Sørensen: 1 post

People

Translate

site design / logo © 2022 Grokbase