Hi Malcolm

   I had read your link ,but I still can't find solution :( .
   May be I didn't explain sufficiently.

   In table "Product":
-----------------------
Name Type
-----------------------
productA 1
productB 1
productC 3
productD 3

   I want to display a form like this sample:
-------------------------------------
What do you want to buy?

Product A [radio button]
Product B [radio button]

-----------------------------------
   But if I insert a row ProductE 1 into table Product,next time I
open the form would be like this:

------------------------------------
What do you want to buy?

Product A [radio button]
Product B [radio button]
Product E [radio button]

Could you guys pls kindly help? I am Newbie :(

On Mar 5, 5:29 pm, Malcolm Tredinnick <[email protected]>
wrote:
> On Thu, 2009-03-05 at 00:13 -0800, andrew wrote:
> > Hi , Dear all:
>
> >     I had searched this forum but with limit information about dynamic
> > forms .
>
> >    Model:
> > -------------------------------------------------
> > class Product(models.Model):
> >    name = models.CharField(max_length=30)     # Product Name
> >         type = models.IntegerField(max_length=30)    # Type ID
>
> >  I want to create a certain type product list form for visitor to
> > choice one and submit.
> > the Product table may continuously changed .
>
> > So how can I create a list in the form?
>
> Have you read the forms documentation? In particular, the list of
> available field types (ChoiceField looks like something that might
> interest you)?
>
> http://docs.djangoproject.com/en/dev/topics/forms/
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to