[Zope] dtml-if question
Kyroraz
kyroraz@cableaz.com
Sun, 02 Dec 2001 23:02:50 -0700
Thanks for the reply ...
but I don't think this is quite what I am going for....
Assume that I have two webpages, page A and page B...
Page A is a form-filled page:
<form name="stuff" action="b">
<input type="checkbox" name="item1">Item 1 <BR>
<input type="checkbox" name="item2">Item 2 <BR>
<input type="submit">
</form>
Page B contains the code to look in a SQL database. Inside this
database, one of the columns contains information in relation to item1
and item2 that has to be set in "b" somehow. If the user selects
checkbox 1, item1 will be defined. Likewise for item2. Both can be set
as well.
<dtml-in sql_process>
<dtml-if <dtml-var check_to_see_if_this_column_exists_with_the_passed_form>>
Exists.
<dtml-else>
Does not exist.
</dtml-if>
</dtml-in>
I need the value of
check_to_see_if_this_column_exists_with_the_passed_form parsed so that
the dtml-if can "see" it....
If the table contains
Name | Value | ...
item1 50
item2 75
And replace that long
check_to_see_if_this_column_exists_with_the_passed_form with name, for
example, it should go through the table, see "name" and then try to see
if "item1" was passed from the form.
Tricky.
Jason
Wolfram Kerber wrote:
><dtml-if <dtml-var
> important_column_that_may_exist_also_as_a_passed_variable> >
>
>should read:
>
><dtml-if important_column_that_may_exist_also_as_a_passed_variable>
>
>and don't forget to close the dtml-in loop with </dtml-in>
>
>
>Wolfram
>
>