Skip to content

Commit

Permalink
fix: save not returning js formData
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Jun 7, 2021
1 parent fe633e2 commit 490ad72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,8 +1381,11 @@ const FormBuilder = function (opts, element, $) {
clearFields: animate => h.removeAllFields(d.stage, animate),
showData: h.showData.bind(h),
save: minify => {
h.save(minify)
config.opts.onSave(h.getFormData())
const formData = h.save(minify)
const formDataJS = window.JSON.parse(formData)
config.opts.onSave(formDataJS)

return formDataJS
},
addField: (field, index) => {
h.stopIndex = data.formData.length ? index : undefined
Expand Down

0 comments on commit 490ad72

Please sign in to comment.