[albatross-users] revisiting checkboxes..

Eric S. Johansson esj at harvee.org
Thu Jun 26 09:30:56 EST 2003


in current camram spamtrap user interface, each row contains a check box.  The 
check box has a unique name and value and is checked or unchecked based on a 
score.  The name and value is based on the spamtrap ID.

the users work task is to correct the assessment of whether or not the messages 
spam.  In processing the users feedback, use the checkbox state (checked or 
unchecked) to tell me how to process what is in the value field.  I use the 
value field to tell me what to process (i.e. which message).

I'm having trouble doing this within the boundaries of albatross.  The 
documentation hints at the ability to group checkbox items into a list but I'm 
not sure if it will give me both checked and unchecked information.

in summary, I need to figure out how to:

associate data with a checkbox
explicitly set the state
return the data with a checkbox data (check or unchecked)

I think I'm partway there

<al-input type="checkbox" name="retrain_list"  valueexpr="spamtrap_token"  list 
onclick="CCA(this,'mystery');DownReset();" >

yields:

<input type="checkbox" onclick="CCA(this,'mystery');DownReset();" 
name="retrain_list" value="fd18bcd1a7363142">

seems okay except for the checkbox.  I could probably generate checkbox if I 
assigned the value of spamtrap_token to retrain_list but that strikes me as an 
odd way to approach the problem.

as for getting a list of which fields were checked off, I find that there is a 
context variable created using the name from the name field:

Jun 25 19:20:45 harvee python2: retrain_list = ['fd18bcd1a7363142', 
'35e22ff9b3523135', '64854d86b4dc81ef']

I'm still unclear on how to get a list of what isn't checked off.  FYI, the 
reason I just can't go back to the original source is because it's always 
changing as more spam comes in.  Storing all the information in a hidden field 
is possible but unpleasant to contemplate.

on handling button presses, I'm grateful for Mike's suggestion of using 
req_equals to determine when buttons have been pressed as well as the subsequent 
discussion on the pros and cons for various techniques.

wait till I start tackling something really difficult ;-)

---eric





More information about the Albatross-users mailing list