title: Setting the initial value for a readonly Choice (ForeignKey) field
body: <p>I'm trying to make a CreateView have a readonly field with a set value, but I'm unable to make that work.</p>
  
  <p>I have a model with a ForeignKey to another model:</p>
  
  <pre><code>class CompanyNote(TimeStampedModel):
      company = models.ForeignKey(Company)
      note = models.TextField(blank=True)
  </code></pre>
  
  <p>And I have a CreateView:</p>
  
  <pre><code>class CompanyNoteCreateView(CreateView):
      model = models.CompanyNote
      form_class = CompanyNoteForm
  </code></pre>
  
  <p>That uses a custom ModelForm:</p>
  
  <pre><code>class CompanyNoteForm(forms.ModelForm):
  
      company = forms.ChoiceField(
          widget=forms.widgets.Select(attrs={'readonly': 'readonly'}))
  
      class Meta:
          model = models.CompanyNote
  </code></pre>
  
  <p>As you see, the widget for the field in question is readonly. This is because I pick up the company as a part of the URL, as in <code>company/1/note/add</code> . I have no trouble picking up the "1" and finding the right company object, but I don't know how to set the readonly field.</p>
  
  <p>I tried:</p>
  
  <pre><code>def get_initial(self):
      initial = super(CompanyNoteCreateView, self).get_initial()
      initial['company'] = self.get_company().id
      return initial
  </code></pre>
  
  <p>But that didn't work. The Widget is empty, which may be the problem. Perhaps I'm barking up the wrong tree here. Any ideas welcome.</p>