Hi all, I'm tryng to use ad_form in a section where I want do a backup of tables on one package. The first step is to show all tables and tables fields in order to allow a selection of field to backup....
So I show all the table and all the fields using ad_form:
<pre>
set all_candidate_tables {table1, table2, table3}
foreach i $all_candidate_tables {
set cols [db_columns $i]
set opts ""
foreach n $cols {
lappend opts "$n $n"
}
lappend all_candidate_tables2 [list $i:text(checkbox),multiple,optional {} [list options $opts ]]
}
ad_form -name lista -form $all_candidate_tables2
....
</pre>
The code gives for each field of tables a code like:
<td> <input type="checkbox" name="table1" value="field1_of_table1" id="lista:elements:table1:field1" /> </td>
And it's ok. But I want all field selected by default. So my question is how can I obtain a code where each field is checked? like:
<td> <input type="checkbox" name="table1" value="field1_of_table1" id="lista:elements:table1:field1" checked /> </td>
thx