web/formwidgets.py
changeset 4169 341d19ef7b7c
parent 4163 b2747ed057e6
child 4252 6c4f109c2b03
equal deleted inserted replaced
4168:9d83f9c80c1c 4169:341d19ef7b7c
    63         return values, attrs
    63         return values, attrs
    64 
    64 
    65     def process_field_data(self, form, field):
    65     def process_field_data(self, form, field):
    66         posted = form._cw.form
    66         posted = form._cw.form
    67         val = posted.get(field.input_name(form))
    67         val = posted.get(field.input_name(form))
       
    68         if isinstance(val, basestring):
       
    69             val = val.strip() or None
    68         return val
    70         return val
    69 
    71 
    70     @deprecated('[3.6] use values_and_attributes')
    72     @deprecated('[3.6] use values_and_attributes')
    71     def _render_attrs(self, form, field):
    73     def _render_attrs(self, form, field):
    72         """return html tag name, attributes and a list of values for the field
    74         """return html tag name, attributes and a list of values for the field