Using Checkboxes in Albatross

From PeformIQ Upgrade
Jump to navigation Jump to search

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