[albatross-users] Form state problem

Michael Neel neel at mediapulse.com
Tue Oct 29 14:27:21 EST 2002


Hi all,

	The following albatross template code is giving me some trouble
and I can't see why:

    <al-form method="POST">
    <al-input type="checkbox" name="custom_form" value="yes"> Enable
Custom Form
    <table>
    <tr>
        <td>Displayed</td>
        <td>Field Name</td>
        <td>Ordering</td>
    <tr>
    <al-for iter="r" expr="((1,'One'),(2,'Two'))">
    <al-exec expr="chkbox.append(None); cfid.append(None);
order.append(None)">
    <tr>
        <td><al-input type="checkbox" nameexpr="'chkbox[%d]' %
r.count()" value="yes">
            <al-input type="hidden" nameexpr="'cfid[%d]' % r.count()"
expr="r.value()[0]"></td>
        <td><al-value expr="r.value()[1]"></td>
        <td><al-input type="text" size="2" nameexpr="'order[%d]' %
r.count()"></td>
    </tr>
    </al-for>
    <tr>
        <td colspan="2"><al-input type="submit" name="submit" value="<-
Step 4"></td>
        <td align="right"><al-input type="submit" name="submit"
value="Step 6 ->"></td>
    </tr>
    </table>
    </al-form>

	All the fields are set in the session and set to None or as an
empty list.  The problem is if I check the first checkbox (One) the
value of order[0] becomes "yes".  I've had this same code work on a one
page form, but now has trouble when it one form of many in a sequence.
I'm not doing anything to the values (yet), just trying to make sure the
state gets set on all fields before going on.  Any clues would be
greatly appreciated.

Thanks,
Mike




More information about the Albatross-users mailing list