def filter_formstyle_summary(form, fields, *args, **kwargs):
 def render_row(row_id, label, widget, comment, hidden=False):
  controls = FIELDSET(LEGEND(label), widget)
  return DIV(controls, _id=row_id)
 if args:
  row_id = form
  label = fields
  (widget, comment) = args
  hidden = kwargs.get('hidden', False)
  return render_row(row_id, label, widget, comment, hidden)
 else:
  parent = TAG['']()
  for (row_id, label, widget, comment) in fields:
   parent.append(render_row(row_id, label, widget, comment))
  return parent

def filter_formstyle_summary ( form , fields , * args , ** kwargs ) : def render_row ( row_id , label , widget , comment , hidden = False ) : controls = FIELDSET ( LEGEND ( label ) , widget ) return DIV ( controls , _id = row_id ) if args : row_id = form label = fields ( widget , comment ) = args hidden = kwargs . get ( 'hidden' , False ) return render_row ( row_id , label , widget , comment , hidden ) else : parent = TAG [ '' ] ( ) for ( row_id , label , widget , comment ) in fields : parent . append ( render_row ( row_id , label , widget , comment ) ) return parent
custom formstyle for filters on the incident summary page .