hey siddhartha i have similar problem, i created dynamic option with ajax 
calls and getting the same error
"select a valid choice. xyz is not available choices , how did you solved 
it?"

On Tuesday, December 11, 2012 5:09:48 PM UTC+5:30, siddharth56660 wrote:
>
> Hi, 
>
> I am facing problem in handling modelform and ajax together. 
> The situation is:- 
> I am using modelform to get display the form as ul in the template. 
> I have 3 ChoiceFields (country, state,city). On select of a country 
> from the dropdown, the valid states dropdown gets populated and on 
> select of a state the respective city dropdown gets populated. 
> For achieving the above functionality I am calling an ajax function 
> which returns me the available data of the other dropdown in Json Form 
> {stat_id, stat_name} 
> I am able to populate the data in next dropdown i.e state and city, 
> but when i click submit form it shows "Select a valid choice. 8 is not 
> one of the available choices" 
> 8 happens to be the stat_id in this case. 
> I have gone through google but dint find anything useful. Help is 
> really appreciated. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to