[html-formfu] Some FormFu questions from a beginner

John M. Dlugosz mk5h6fmfqx at snkmail.com
Wed Mar 23 14:17:23 GMT 2011


On 3/23/2011 5:19 AM, Carl Franks fireartist-at-gmail.com |FormFu Mailing L=
ist/Allow to =

home| wrote:
> See "container_attributes"
> http://search.cpan.org/~cfranks/HTML-FormFu-0.08002/lib/HTML/FormFu/Eleme=
nt/_Field.pm#container_attributes
>
That reads in full, "Arguments added to the field's container.".  It's shor=
ter than the =

url that you pointed to it with!
It's not really clear that the "attributes" you are referring to are HTML a=
ttributes on =

the tag; it seems like some kind of property or parameter used by the code =
itself.

> I'd personally recommend using CSS to rearrange them, but if you want
> to change the markup - single_reverse is the correct way.
> I've just tested it, and it does work - did you check the actual
> markup? Maybe your CSS was making it look like nothing had changed.
> I've just committed a new test to github, so you can see how I tested
> it - see the files:
>      t/elements/checkbox_reverse.t
>      t/elements/checkbox_reverse.yml
>
Ah, I just used the keyword on a line by itself, and did not follow it with=
 a '1'.

Using CSS, how would you reverse them?

>> * On a related note, how do I make the checkbox initially checked when t=
he
>> form is displayed with no data? The value is already 1, and I guess that=
's
>> what it would be if it was set. What I want to do is display a text area,
>> and under that a submit button on the left, and a checkbox with "CC me" =
on
>> the right, on the same level as the button.
> $field->default(1);
>
Thanks.  I seem to have stopped reading when I saw =ABFor most fields, "val=
ue" =

<http://search.cpan.org/%7Ecfranks/HTML-FormFu-0.08002/lib/HTML/FormFu/Elem=
ent/_Field.pm#value> =

is an alias for "default" =

<http://search.cpan.org/%7Ecfranks/HTML-FormFu-0.08002/lib/HTML/FormFu/Elem=
ent/_Field.pm#default>.=BB, =

and looked in the Checkbox class itself for details on what it does differe=
ntly.  The use =

for Checkbox is documented (only) in Field.


> Hope this helps,
> Carl

Indeed!  That fixes everything I was hung up on.  Thank you for your compre=
hensive reply.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20110323/1e=
fcc779/attachment.htm


More information about the HTML-FormFu mailing list