newforms icon indicating copy to clipboard operation
newforms copied to clipboard

formUpdate not displaying new data

Open bogdanned opened this issue 9 years ago • 0 comments

Hi,

I am using formUpdate to update form fields from an ajax source. Although the update works and the data appears as value of the inputs the fields are displayed as empty(but validated).

Updating values here:

  componentDidMount: function() {
    var self = this;
    self.serverRequest = $.get(self.state.source, function (result) {

      order = JSON.parse(result)

      var form = self.refs.bookingForm.getForm()
      //updateData Test
      form.updateData({second_name: 'testing',
                       first_name: 'first_name',})

    }.bind(self));
  },

Any ideas?

bogdanned avatar Aug 02 '16 10:08 bogdanned