[Zope] Returning and showing value of a checkbox
Don Brooksby
DonB@clh.com
Tue, 21 Jan 2003 16:42:58 -0700
I am a 1 year old newbie and 1st time participant to the email =
group...working on a total website using PostgreSQL in the background. =
I have hit a wall where help would be appreciated.
In a nut-shell, I have an area where employees can submit articles of =
industry info for our customers. In that article submission they check =
off a checkbox denoting what specific customer sub-web they want it =
published. I then have an area where they can go back in and edit the =
article or delete totally.
The only problem I have is showing in the checkboxs what was selected =
when they first submitted the article. Of course when I have the =
following:
I bring in the value from another DTML Method reading the request from =
PostgreSQL:
<input type=3Dhidden name=3D"main" value=3D"<dtml-var main>">
In the form I have the checkbox show up in the form, but it is not =
checked if the value
pulled from the db is appropriate:
<td><b>Main:</b></td>
<td><input type=3D"checkbox" name=3D"newmain" value=3D"1"></td>
I have tested that the value is appropriate, but cannot figure how to =
show that checkbox as filled if it is supposed to be (1 as checked and 0 =
as not checked).
I am figuring that Python will be the solution, but if the employee =
wants to uncheck the box, how is that handled with a dtml instance?
Thank you
Don Brooksby