title: Django Admin - Custom Inline Form
body: <p>I'm attempting to use a custom inline form within the django admin.</p>
  
  <p>admin.py --</p>
  
  <pre><code>class EmpInline(admin.StackedInline):
      model = Emp
      form = UpdateYearlyForm
      show_change_link = True
  
  class CompanyAdmin(admin.ModelAdmin):
      list_display = ('companyname','companyid','get_active', 'get_updated')
      inlines = [EmpInline]
  </code></pre>
  
  <p>When the Company name is clicked on, the company details are shown along with a formset for all the related employees.</p>
  
  <p>This works in regards to displaying the form however one of the fields is a custom choice field which indirectly updated a model field. Which, in the normal user view (this form needs to be used both by an admin for all records and for users for the records pertaining to them) the custom field is handled as below. </p>
  
  <p>I've only shown a snippet of the view as it is quite long.</p>
  
  <p>views.py --</p>
  
  <pre><code>if formset.is_valid():
          for form in formset.forms:
              if form.is_valid():
                  obj = form.save(commit=False)
                  data = form.cleaned_data
                  if data['updatefield'] == 'accident':
                      obj.years += 1
                  else data['updatefield'] == 'free':
                      obj.years += 1
                  obj.save()
  </code></pre>
  
  <p>Is there a way of handling the form (and the custom field) in the same way when used as an inlineform in the admin?</p>