def extract_field_data(field):
  """
  given a form field, return its value
  """
  if not field.form.is_bound:
    res = field.form.initial.get(field.name, field.field.initial)
    if callable(res):
      return res()
    return res
  else:
    return field.data