title: Dash Bootstrap components : Reset Modal
body: <p>I am using dash bootstrap modal that is a form that accepts input and adds it to the datatable. When I input data and close the modal, the data is still saved and persist. I am not using <code>persistence</code> attribute, however, the data still doesn't clear.</p>
  <p>When I reopen the modal, it automatically adds new information previously stored. Is there a way to clear all the values and reset the modal when the modal is closed?</p>
  <p>For reference: <a href="https://dash-bootstrap-components.opensource.faculty.ai/docs/components/modal" rel="nofollow noreferrer">https://dash-bootstrap-components.opensource.faculty.ai/docs/components/modal</a></p>
  <pre><code># Add new property modal
  
              dbc.Button(&quot;ADD&quot;, id=&quot;add&quot;),
  
              dbc.Modal(
                  [
                        dbc.ModalHeader(&quot;Add new information&quot;),
                        dbc.ModalBody(
                            [
  
                                dbc.InputGroup(
                                    [
                                      
                                        dcc.Input(id=&quot;Address&quot;),
  
  
                                        dcc.Input(id=&quot;City&quot;),
  
  
                                        dbc.Input(id=&quot;Zipcode&quot;),
  
                                    ],
  
                                    
                                ),
  
                              # Close ModalBody
                              ]),
  
                              dbc.ModalFooter(
                                    [
                                        dbc.Button(&quot;SAVE&quot;, id=&quot;save&quot;),
                                    ]
                              ),
                      # Close Modal
                      ],
                      id=&quot;modal-2&quot;,
               ),
  
  
  # Add information
  @app.callback(Output(&quot;modal-2&quot;, &quot;is_open&quot;),
               [
                    Input(&quot;add&quot;, &quot;n_clicks&quot;),
                    Input(&quot;save&quot;, &quot;n_clicks&quot;)
               ],
  
               [
                    State(&quot;Address&quot;, &quot;value&quot;),
                    State(&quot;City&quot;,&quot;value&quot;),
                    State(&quot;zipcode&quot;,&quot;value&quot;),
                    State(&quot;modal-2&quot;, &quot;is_open&quot;)
               ],
               )
  def add(add_btn, save_btn, address, city, zipcode, is_open):
  
      if button_id == &quot;add_btn&quot;:
  
          return not is_open
  
      elif button_id == &quot;save_btn&quot;:
  
          return not is_open
  
  </code></pre>