code: def form_fields(self):
          
  
          fields = dict(self.form.fields) # pylint: disable=no-member
  
          fields_to_remove = set()
  
          for key, val in list(fields.items()):
              if isinstance(val, CheckboxValues):
                  if not len(val): # pylint: disable=len-as-condition
                      del fields[key]
                  elif len(val) == 1:
                      fields[key] = val.pop()
                  else:
                      fields[key] = list(val)
              if isinstance(val, MultipleSelectOptions):
                  if not len(val): # pylint: disable=len-as-condition
                      del fields[key]
                  elif len(val) == 1:
                      fields[key] = val.pop()
                  else:
                      fields[key] = list(val)
  
          for elem in self.form.inputs: # pylint: disable=no-member
              # Ignore elements without name
              if not elem.get('name'):
                  continue
  
              # Do not submit disabled fields
              # http://www.w3.org/TR/html4/interact/forms.html#h-17.12
              if elem.get('disabled'):
                  if elem.name in fields:
                      fields_to_remove.add(elem.name)
              elif getattr(elem, 'type', None) == 'checkbox':
                  if not elem.checked:
                      if elem.name is not None:
                          if elem.name in fields and fields[elem.name] is None:
                              fields_to_remove.add(elem.name)
              else:
                  if elem.name in fields_to_remove:
                      fields_to_remove.remove(elem.name)
                  if elem.tag == 'select':
                      if elem.name in fields and fields[elem.name] is None:
                          if elem.value_options:
                              fields[elem.name] = elem.value_options[0]
  
                  elif getattr(elem, 'type', None) == 'radio':
                      if fields[elem.name] is None:
                          fields[elem.name] = elem.get('value')
          for fname in fields_to_remove:
              del fields[fname]
          return fields
docs: Return fields of default form.
  
          Fill some fields with reasonable values.