I am not sure if I worded my question correctly, sorry for confusion.
Consider:
db.define_table('form1',
Field('number', 'integer'),
Field('field1', 'string'),
Field('field2', 'string),
Field('field3', 'integer'))
db.define_table('formfile',
Field('number_id', db.form1),
Field('form1_file', 'upload'))
field1, field2, field3 is generated dynamically for form1, but there is always only one form field for the number field.
Given this example:
User enters 2.
This generates the form:
number
field1_0
field2_0
field3_0
field1_1
field2_1
field3_1
I take the values entered form this session, do something to them, then I want to insert them into a file.
I am doing this in a different controller, and I would like to know if I am going about this in the right way because having two tables is throwing me off.
I want to upload this file from this session to the table formfile, which will reference form1, but I want the table to display the number field and the file that is associated with that number field id from that session for each specific user.
So each time form1 is filled, there will be a file correlating to that session in the formfile table.
Does this make sense with how I have my tables defined?