zoom.forms module¶
zoom.forms
-
class
zoom.forms.Form(*args, **kwargs)¶ Bases:
zoom.fields.FieldsAn HTML form
>>> from zoom.fields import TextField >>> form = Form(TextField("Name")) >>> print(form.edit()) <form action="" class="clearfix" enctype="application/x-www-form-urlencoded" id="zoom_form" method="POST" name="zoom_form"> <input name="csrf_token" type="hidden" value="<dz:csrf_token>" /> <div class="field"> <div class="field_label">Name</div> <div class="field_edit"><table class="transparent"> <tr> <td nowrap><input class="text_field" id="name" maxlength="40" name="name" size="40" type="text" value="" /></td> <td> <div class="hint"></div> </td> </tr> </table> </div> </div> </form>
-
edit()¶
-
-
zoom.forms.delete_form(name, cancel=None)¶ produce a delete form
-
zoom.forms.form(content=None, **kwargs)¶ returns the first part of a form
-
zoom.forms.form_for(*args, **kwargs)¶ returns a form with optional hidden values
>>> print(form_for('test')) <form action="<dz:request_path>" class="clearfix" enctype="application/x-www-form-urlencoded" id="zoom_form" method="POST" name="zoom_form"> <input name="csrf_token" type="hidden" value="<dz:csrf_token>" /> test </form>
-
zoom.forms.helpers(request)¶ form helpers
-
zoom.forms.multipart_form(content, **kwargs)¶ Returns a multipart form tag.
-
zoom.forms.multipart_form_for(content, **keywords)¶ Returns a multipart form tag, surrounding specified content.