i have a birth date field of type date and when i create form that include that field a calender is displayed into page what i want to do is replace this calender with dropdowns (year,month,day)
i created tables
db.define_table("All_months",
SQLField("month","integer")
)
and
db.define_table("All_days",
SQLField("day","integer"))
and
db.define_table("All_years",
SQLField("year","integer" ))
and in the default.py
This is the whole form:
insert_member_form=SQLFORM(db.member,fields=['first_name','middle_name','last_name','birthdate')
birthdate_form=form_factory('b',SQLField('year',db.All_years.year,requires=IS_IN_DB(db,'All_years.year')),SQLField('day',db.All_days.day,requires=IS_IN_DB(db,'All_days.day')), SQLField('Month',db.All_months.month,requires=IS_IN_DB(db,'All_months.month'))
)
finally insert that form to The big form By:
insert_member_form[0].insert(5,birthdate_form[0][0])
insert_member_form[0].insert(5,birthdate_form[0][1])
insert_member_form[0].insert(5,birthdate_form[0][2])
but it displayed an error called "ValueError: invalid literal for int() with base 10: 'upload'".
I dont why??
so pleas could you tell me any other solutions to do what i want?
Thanks in Advance