title: How to vary a Materialize modal based on trigger button?
body: <p>I'm using the Materialize CSS and have a working modal for creating new model instances. When I click the edit button on an instance, I want to open the same modal only with the fields pre-populated. </p>
  
  <p>In bootstrap I could accomplish this using</p>
  
  <pre><code>$('#exampleModal').on('show.bs.modal', function (event) {
      modal.find('.modal-body input').val('new value')
  })
  </code></pre>
  
  <p>This function doesn't appear to work using Materialize. Is there an equivalent function I can use instead?</p>