[PHPTAL] How managing checked="checked" ?
Guillaume Lecanu
Guillaume at lya.fr
Sat Apr 26 23:07:56 CEST 2008
Le samedi 26 avril 2008 à 19:34 +0200, Iván -DrSlump- Montes a écrit :
> I think to recall that PHPTAL knows about 'boolean' attributes like
> 'checked' and 'selected'. Have you tried something like this?
>
> <input type="checkbox" name="agreement" value="1"
> tal:attributes="checked agreement" />
Hi Iván,
This put a checked="" in the 'false' case.
And this check the box on some browsers.
But I have may be found a solution with custom modifiers.
Thanks
>
> iván
>
> On Sat, Apr 26, 2008 at 6:57 PM, Guillaume Lecanu <Guillaume at lya.fr> wrote:
> >
> > Hi,
> >
> > How is it possible to remove an attributes (or to add it) depending of a
> > value/condition ?
> >
> >
> > If ($agreement) {
> >
> > <input type="checkbox" name="agreement" value="1" checked="checked" />
> >
> > } else {
> >
> > <input type="checkbox" name="agreement" value="1" />
> >
> > }
> >
> > Thanks !
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL at lists.motion-twin.com
> > http://lists.motion-twin.com/mailman/listinfo/phptal
> >
> >
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
-------------- section suivante --------------
Une pi�ce jointe HTML a �t� enlev�e...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080426/f4f08ca6/attachment.htm
More information about the PHPTAL
mailing list