Hi,
A hidden field won't support multiple values, so you'd need to
serialize them yourself - for example with JSON.
$field->default( encode_json( $value ) );
I'd recommend though, just using Block elements, as it's very easy to
attach IDs or class-names, which your JavaScript can target to
show/hide the blocks.
Carl
On 22 June 2010 08:19, Hu Hailin <[email protected]> wrote:
> Hi
>
> My situation is that I have so large a form that I try to split some
> condition out to display them in a collapsible div with javascript.
> So I am trying to pass data using Element::Hidden, but it accepts
> first value and fills it in form in multiple values' case.
> I also glanced at Element::Repeatable which seems not the one I want...
>
> Yes, it might be implemented using blocks but a little too complex.
> Any advice for implementing a repeatable hidden element?
>
> Thanks.
> --
> islue
>
> _______________________________________________
> HTML-FormFu mailing list
> [email protected]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu