HTML-FormHandler Updating fields with the SET data type
I have MySQL table which uses field with the SET data type, for example
`color` SET( 'red', 'green', 'blue' )
I can not find the right way to use HTML-FormHandler for this field. I
tried to use the next variant. I have create form with multiple field
has_field 'color' => ( type => 'Multiple', size => 3,
options => [ { value => 'red', label => 'Red'},
{ value => 'green', label => 'Green'},
{ value => 'blue', label => 'Blue'} ] );
But this does not work. I think because, DBIx returns string value for SET
field ('red,blue') but HTML-FormHandler needs array ref (['red', 'blue']).
Is there any proper way to use HTML-FormHandler for such fields?
No comments:
Post a Comment