title: Dynamic model choice field on a django cms plugin
body: <p>I'm currently working on a django cms plugin with a model choice field dependent on another field in the form. What i'm doing now via ajax is that, when the trigger field is selected, the dependent model choice field is updated via ajax to change the choices in the select field. However on submit, of the form, i'm encountering this error</p>
  
  <p>“Select a valid choice. That is not one of the available choices.”</p>
  
  <p>I did some digging in stack overflow and found a similar issue</p>
  
  <p><a href="https://stackoverflow.com/questions/28339713/while-using-ajax-with-django-form-getting-error-select-a-valid-choice-that-is">While using ajax with django form, getting error &quot;Select a valid choice. That is not one of the available choices.&quot;</a></p>
  
  <p>Based on the link above, i should update model choice field in the form of the plugin itself depending on the value of the trigger field which i will get from request.POST</p>
  
  <p>How do i go about doing this for a django cms plugin? Which method of the cms plugin should I override? I'm assuming its a method in the plugin's CMSPluginBase class but i'm not sure exactly what method to override and also how will i get the current form being used by my plugin so i could override that in the said method?</p>
  
  <p>Thanks</p>