(Oct-24-2018, 04:59 PM)j.crater Wrote: Hello,
we would much rather see if you explained the problem here, as well as post the code in Python code tags. Thanks.
Sure no problem:
I was wondering if someone could help me.
I want to be able to click on customer and locations be based off of the certain customer, being a dependent dropdown. This information is coming from a database, hence the queries in the following code.
This is my form function for both customer and location
class CustomerPick(SubForm): customer = QuerySelectField(u'Customer', get_label=u'sCustomer', query_factory=lambda : (TCustomer.query.order_by(TCustomer.sCustomer)), validators=[DataRequired(),]) location = QuerySelectField(u'Location', get_label=u'sLocation', query_factory=lambda : (TLocation.query.order_by(TLocation.sLocation)), validators=[DataRequired(),])Here is the view portion
@route('new/', methods=['GET', 'POST']) def new(self): form = CustomerPick() if form.validate_on_submit():This is a picture of the dropdown also for reference, if there is anything else needed for you guys to have a go please let me know. Thanks in advance! https://i.stack.imgur.com/Nzf5J.png