[pmwiki-users] CheckBox Problem Help
edwin marte
edwin.marte at leidba.com
Fri Mar 20 20:41:30 CDT 2009
Hello all,
A lot of things I have done since this post and right now I amd doing things
a bit differently. (Thanks to Peter Bowers for his Help Offlist.) I changed
what I was doing at the begining and solved part of my problems using Zap
and Checkboxes arrays.
Now I partially have what I wanted but another question or doubt has come to
my mind. I know how to pre-set a checkbox state to checked or unchecked
depending or previous state. But how come this is possible to be done with
checkbox arrays?
the following code is taken from:
http://zapdoc.web-farm.org/index.php/Snippets/Arrays
[[#ID]]
(:messages:)
(:zapform:)
(:input checkbox test[] Alpha:)Alpha
(:input checkbox test[] Beta:)Beta
(:input checkbox test[] Gamma:)Gamma
(:input checkbox test[] Delta:)Delta
(:input checkbox test[] Epsilon:)Epsilon
(:input submit:)
(:zap savedata="test":)
(:zapend:)
CSV: {$:test}
[[#ID]]
(:test: Delta,Epsilon:)
In this case, is there a way, when I want to edit or change the values for
this page, that the checkboxes for DELTA and EPSILON could be shown as
checked ? I havent figure it out yet.
Help apreciated.
Edwin
On Fri, Mar 13, 2009 at 11:09 AM, edwin marte <edwin.marte at leidba.com>wrote:
> I am struggling wit check boxes. I have read a lot trying to see if
> somebody have done it something about it. I found a few examples but nothing
> that could save my problem.
>
> I know it should be easy but I have not been able to do it. I have tried
> using fox and zap.
>
> What I am trying to do is something similar like below:
>
> (:input checkbox Test 1 :) Test
>
> (:if equal {$:Test} 1:)
> (:input hidden PPss "active":)
> (:else:)
> (:input hidden PPss "No Active":)
> (:ifend:)
>
> (:input submit post Enviar:)
>
> I am trying to save the PPss PTV in the same page I am working on for test.
> Not even caring about checkbox last state. I just want to give a PTV a value
> if checkbox is checked and give to that PTV another value otherwise.
>
> I know after a few test my checkbox is giving 1 or an empty value but I
> have not been able to set the PTV properly in the conditional.
>
> If anybody can point me right this simple matter it will be very useful for
> me, I am trying to finish something here and that is the only missing.
>
> Best Regards,
> Edwin
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090320/fa98e56b/attachment.html
More information about the pmwiki-users
mailing list