Form Submission with DataTable

Hi all,

I’d like to know how I can include the contents of a DataTable in a Form submission.

Following from the example given here, I’ve included a simple table as part of the form:

import flask
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_table
import pandas as pd

df = pd.read_csv('')

app = dash.Dash(__name__)

app.layout = html.Form([


                         columns=[{"name": i, "id": i} for i in df.columns],

    html.Button('Submit', type='submit')

], id='input_form', action='/post/', method='post')

@app.server.route('/post/', methods=['POST'])
def post():
    data = flask.request.form       # I want 'data' to contain the contents of my table
    return flask.redirect('/')

In the above code snippet the dcc.Input(name='name') gets sent with the Form, but not the contents of the table.

Question is: how do I get the contents of the DataTable to be sent as part of the form submission?


Have you solved this problem yet? I’m stuck like you
can you give me the solution please?