Difference between revisions of "Using Checkboxes in Albatross"

From PeformIQ Upgrade
Jump to navigation Jump to search
(New page: =Albatross Checkboxes= ==In the html:== <pre> <al-input type="checkbox" name="CurrentCB"> </pre> ==In the Python:== <pre> if ctx.locals.person.fields.Current == 1: ctx.locals....)
 
 
Line 8: Line 8:


==In the Python:==
==In the Python:==
in page_display()...


<pre>
<pre>
Line 14: Line 16:
   else:
   else:
       ctx.locals.CurrentCB      = 'off'
       ctx.locals.CurrentCB      = 'off'
</pre>
In page_Process()...
<pre>
  if ctx.locals.CurrentCB == 'on':
      Current        = 1
  else:
      Current        = 0
</pre>
</pre>

Latest revision as of 17:18, 9 March 2008

Albatross Checkboxes

In the html:

<al-input type="checkbox" name="CurrentCB">

In the Python:

in page_display()...

   if ctx.locals.person.fields.Current == 1:
      ctx.locals.CurrentCB      = 'on'
   else:
      ctx.locals.CurrentCB      = 'off'

In page_Process()...

   if ctx.locals.CurrentCB == 'on':
      Current        = 1
   else:
      Current        = 0