0

I want to make a simple accounting application and I have a model with 3 fields:

  • account_symbol
  • account_debit
  • account_credit

And I want to make a form for the user to enter the accounts for the balance, after entering the first set (of 3 fields) the form (after the user press a button) should reveal another set and so on.

After all the accounts should be entered, the user should submit the form to the database.

I read the b-list.org approach and I don't think is what I need and the formsets docs but what I want is the user to control the length of the form by adding additional sets of 3 fields.

Please point me to an approach for my problem.

Kaigara
  • 91
  • 1
  • 10

1 Answers1

1

Formset is exactly what you need here. You just need to use JavaScript to dynamically show new formsets to user (like in admin app). Here's nice example of doing this.

Community
  • 1
  • 1
DrTyrsa
  • 31,014
  • 7
  • 86
  • 86