Skip to content Skip to sidebar Skip to footer

Append_entry() Is Not Working After Appending First Time. I Am Using Fieldlist With Flask-wtf, Jinja & Python 3.4

I am facing issue while appending fieldlist through append_entry in flask-wtf. I am able to add one row of fields from fieldlist but after adding first row, i am not able to add se

Solution 1:

Have you tried initializing the form and passing it to append_entry?

@additem.route('/additem/', methods = ['GET','POST'])
def additemcont():
form = AddItemCont(request.form)
if  form.add_item_cont.data:

    ### here
    form_cont = FormCont()
    form.item_cont.append_entry(form_cont)
    ####

    print ("Data is King")
    print (form.add_item_cont.data)
    return render_template('entry.html',form=form)

Post a Comment for "Append_entry() Is Not Working After Appending First Time. I Am Using Fieldlist With Flask-wtf, Jinja & Python 3.4"