Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3960806
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:53:58+00:00 2026-05-20T02:53:58+00:00

I want to make an form for purchasing tickets. The problem is that for

  • 0

I want to make an form for purchasing tickets. The problem is that for every event there can be diferent types of ticket with diferent price.

For every kind of ticket I will have to create an edit box where user can select how much tickets he wants.

Then in view class I will just display the dynamicly created form … the only problem that I see now is that I don’t know where to save an information for each ticket price so I can easy display it in the the same row where the edit box is?

P.S. I’m also not sure how can I dynamicly create a form using Django … but this have to be easy 😉

P.S. Form have to be something like this:

--------------------------------------------------------
| Tiket Type      | Price       | How much? | Price    |
--------------------------------------------------------
| Tiket Type Name | Price $1.00 | [       ] | Price... | [tiketkind.id =  1]
| Tiket Type Name | Price $2.00 | [       ] | Price... | [tiketkind.id = 12]
| Tiket Type Name | Price $3.00 | [       ] | Price... | [tiketkind.id = 18]
| Tiket Type Name | Price $4.00 | [       ] | Price... | [tiketkind.id = 21]
--------------------------------------------------------
|                              TOTAL PRICE: | ...      |
--------------------------------------------------------
| Email: [                                           ] |
--------------------------------------------------------
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:53:59+00:00Added an answer on May 20, 2026 at 2:53 am

    This is pretty easy. Instead of thinking about making dynamic forms, think about making dynamic fields.

    You’ll have one form. When you initialize it, you’ll pass it information about the tickets available. In the init of your form you will dynamically add field objects to the form by appending to self.fields.

    Example:

    self.fields[‘this_field_I_just_made_up’] = forms.CharField()

    Notes:

    1. The first thing you’ll need to do in your init is to pop off your custom values.
    2. The second thing you’ll need to do in your init is to call the init of the superclass with *args and **kwargs.

    If you don’t do those two things, in that order, you will get errors.

    Shawn

    Source: http://groups.google.com/group/django-users/browse_thread/thread/3629184ceb11aeef

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a .NET Form as a TopMost Form for another external
I have an action handling a form post, but I want to make sure
I want to make an etag that matches what Apache produces. How does apache
I want to make a table in SqlServer that will add, on insert, a
I want to make an entity that has an autogenerated primary key, but also
I want to make sure people can't type the name of a PHP script
I want to make sure that a set of functions have the same signature
I want to make a JavaScript application that's not open source, and thus I
I want to make a form and put a divider between each form element,
I want to make a form where then is login and password textfield. Ans

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.