[html-formfu] nested/nested checkboxgroup

Josef Chladek josef.chladek at gmail.com
Wed Apr 15 14:57:14 GMT 2009


hello,

I can't get the following form to save values correctly, how has the  
yaml to be written that the checked checkboxes are saved correctly to  
"BeraterBranchen"? or is nested/nested not possible?

many thanks
josef


package Frontwave::Result::UserDepot;

__PACKAGE__->might_have(beraterdaten =>  
'Frontwave::Result::UserDepotBerater', 'user_id');

-----

package Frontwave::Result::UserDepotBerater;

__PACKAGE__->belongs_to( user_id => 'Frontwave::Result::UserDepot' );
__PACKAGE__->has_many(branchen => 'Foonds::Result::BeraterBranchen',  
'user');

-----

package Foonds::Result::BeraterBranchen;

__PACKAGE__->might_have(branche => 'Foonds::Result::Branche',  
{'foreign.id' => 'self.branche'}, {cascade_delete => 0});
__PACKAGE__->might_have(user => 'Frontwave::Result::UserDepot', 
{'foreign.id' => 'self.user'},{cascade_delete => 0});

-----

---
elements:
   - type: Text
     name: username
     label: '* Username'
   - type: Text
     name: password
     label: '* Password'
   - type: Block
     nested_name: beraterdaten
     elements:
	  - type: Repeatable
	    nested_name: branchen
	    elements:
	       - type: Checkboxgroup
	         label: 'Branche*'
	         name: branche
	         model_config:
	           model: Frontwave
	           resultset: Branche
	           id_column: id
	           label_column: name
	           attributes:
	                order_by: 'id asc'




More information about the HTML-FormFu mailing list