Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::Form::Form::render (   self,
  dict = None,
  REQUEST = None 
) [inherited]

Render form in a default way.

Definition at line 294 of file Form.py.

00294                                              :
        """Render form in a default way.
        """
        dict = dict or {}
        result = StringIO()
        w = result.write
        w(self.header())
        for group in self.get_groups():
            w('<h2>%s</h2>\n' % group)
            w('<table border="0" cellspacing="0" cellpadding="2">\n')
            for field in self.get_fields_in_group(group):
                if dict.has_key(field.id):
                    value = dict[field.id]
                else:
                    value = None
                w('<tr>\n')
                if not field.get_value('hidden'):
                    w('<td>%s</td>\n' % field.get_value('title'))
                else:
                    w('<td></td>')
                w('<td>%s</td>\n' % field.render(value, REQUEST))
                w('</tr>\n')
            w('</table>\n')
        w('<input type="submit" value=" OK " />\n')
        w(self.footer())
        return result.getvalue()

    security.declareProtected('View', 'render_view')
    def render_view(self, dict=None):


Generated by  Doxygen 1.6.0   Back to index