[html-formfu] unicode and yml?

Josef Chladek josef.chladek at gmail.com
Mon Sep 24 12:12:03 GMT 2007


hello list,

when I use the config from yml [1], my output is wrong, as soon as I  
put [% form %] in my tt (umlauts garbled).
when I do the config in my Controller [2], everything's working.
following the thread in
http://lists.scsys.co.uk/pipermail/html-formfu/2007-August/000190.html
looked like that the yml/unicode problem was solved (I'm using  
YAML::Syck 0.97) - any chance on getting this working correctly with  
yml files?

thanks
josef


[1]
sub foo : Local : FormConfig('my_config.yml') {
     my ( $self, $c ) = @_;
...
}

---
action: /auth/login
indicator: submit
languages: ['de']
auto_fieldset:
   legend: Userdaten

elements:
   - type: Password
     name: password
     label: Password
     constraints:
       - Required
   - type: Text
     name: email
     label: Email
     constraints:
       - Email
   - type: Text
     name: nickname
     label: Ihr Name beim Posten
   - type: Submit
     name: submit
     value: Einstellungen speichern


[2]
sub foo : Local : Form {
     my ( $self, $c ) = @_;

     $c->stash->{form}->action('/auth/login');
     $c->stash->{form}->indicator('submit');
     $c->stash->{form}->languages('de');
     $c->stash->{form}->auto_fieldset({legend =>'Userdaten'});

     $c->stash->{form}->populate( {
         elements => [
             { type => 'Password', name => 'password', label =>  
'Password' },
             { type => 'Text',     name => 'email', label => 'Email' },
             { type => 'Text',     name => 'nickname', label => 'Ihr  
Name beim Posten' },
             { type => 'Submit',   name => 'submit', value =>  
'Einstellungen speichern' },
         ],
     } );
...
}



More information about the HTML-FormFu mailing list