> > I do it like this: form = WebrequestsForm(own_id=own_id, initial = {...}) > but I think that the prob is not there. Somehow it has to do with what it is being returned (and tries to be saved in a decimal field of the form) by these: self.fields['veh_id1'].queryset = Vehicles.objects.filter(own_id1=own_id) self.fields['veh_id2'].queryset = Vehicles.objects.filter(own_id2=own_id)
before limiting the choices of the foreign key, I used a charfield (what now is being returned from the above querysets) to display the choices but what was saved to the form was the id corresponding to that charfield (id=another field of the model, not conversion of the charfiels) and everything was working. Any idea how to solve it?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/qYFInuHRNIsJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.