Home | History | Annotate | Download | only in paste

Lines Matching refs:Field

993                 field = fields.get(name)
994 if not field:
995 field = Radio(self, tag, name, match.start(), **attrs)
996 fields.setdefault(name, []).append(field)
998 field = field[0]
999 assert isinstance(field, Radio)
1000 field.options.append((attrs.get('value'),
1006 FieldClass = Field.classes.get(tag_type, Field)
1007 field = FieldClass(self, tag, name, match.start(), **attrs)
1012 in_textarea = field, match.end()
1017 in_select = field
1018 fields.setdefault(name, []).append(field)
1042 Set the value of the named field. If there is 0 or multiple
1055 "No field by the name %r found (fields: %s)"
1064 Get the named field object (ambiguity is an error).
1068 "No field by the name %r found" % name)
1084 field = fields[index]
1085 field.value = value
1089 Get the named/indexed field object, or ``default`` if no field
1101 field = fields[index]
1102 return field
1109 field = self.get(name, index=index)
1110 assert isinstance(field, Select)
1111 field.value = value
1134 field = self.get(name, index=index)
1135 submit.append((field.name, field.value_if_submitted()))
1139 for field in fields:
1140 value = field.value
1158 class Field(object):
1161 Field object.
1164 # Dictionary of field types (select, radio, etc) to classes
1182 "You cannot set the value of the <%s> field %r"
1198 class Select(Field):
1201 Field representing ``<select>``
1239 Field.classes['select'] = Select
1244 Field representing ``<input type="radio">``
1247 Field.classes['radio'] = Radio
1249 class Checkbox(Field):
1252 Field representing ``<input type="checkbox">``
1273 Field.classes['checkbox'] = Checkbox
1275 class Text(Field):
1277 Field representing ``<input type="text">``
1282 Field.__init__(self, form, tag, name, pos,
1285 Field.classes['text'] = Text
1289 Field representing ``<textarea>``
1292 Field.classes['textarea'] = Textarea
1296 Field representing ``<input type="hidden">``
1299 Field.classes['hidden'] = Hidden
1301 class Submit(Field):
1303 Field representing ``<input type="submit">`` and ``<button>``
1316 Field.classes['submit'] = Submit
1318 Field.classes['button'] = Submit
1320 Field.classes['image'] = Submit