[html-formfu] Radiogroup problem

ivorw ooe5-kj0i at xemaps.com
Wed Jun 4 16:54:10 BST 2008


I'm working on a Catalyst app, and want to have a basic radiogroup.

I've done what it says in the pod, and it's failing:

user.yml
---
indicator: submit
auto_fieldset: 1
elements:
    - type: Text
      name: first_name
      label: Forename
      constraints:
        - Required
    - type: Text
      name: last_name
      label: Surname
      constraints:
        - Required
    - type: Text
      name: username
      label: Username
      constraints:
        - Required
    - type: Text
      name: email_address
      label: Email address
      constraints:
        - Email
        - Required
# Added below causes a problem
    - type Radiogroup
      name: active
      options:
        - [ 0, 'Inactive' ]
        - [ 1, 'Active' ]
        - [ 2, 'Suspended' ]
# end of addition
    - type: Submit
      name: submit
      value: Update



My app is now failing with these lines added in:

[error] Caught exception in RockBase::Controller::Admin->user "Can't
locate object method "options" via package "HTML::FormFu::Element::Text"
at /usr/local/share/perl/5.10.0/HTML/FormFu/ObjectUtil.pm line 270.
 at
/usr/local/share/perl/5.10.0/Catalyst/Controller/HTML/FormFu/Action/Config.pm
line 35
 at
/usr/local/share/perl/5.10.0/Catalyst/Controller/HTML/FormFu/Action/Config.pm
line 35"

Anyone seen this before?

Is there a module I need to install that I'm missing?

Does anyone have an example of a Radiogroup that works?

Many thanks,

Ivor.



More information about the HTML-FormFu mailing list