Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Release >= 3.8.0 has changed public formRender API #1279

Closed
lucasnetau opened this issue Mar 19, 2022 · 5 comments
Closed

Release >= 3.8.0 has changed public formRender API #1279

lucasnetau opened this issue Mar 19, 2022 · 5 comments
Labels

Comments

@lucasnetau
Copy link
Collaborator

Description:

Per https://formbuilder.online/docs/formRender/actions/userData/ the userData property on the formRender object should be an object with the current form values

3.8.0 changed the API and now the userData property is a function that needs to be called to return the userData

Possible change triggering the issue src/js/form-render.js#

Environment Details:

  • formBuilder Version: >= 3.8.0
  • Browser: Any
  • OS: Any

Expected Behavior

typeof formRenderInstance.userData (object)

Actual Behavior

typeof formRenderInstance.userData (function)

Steps to Reproduce

Render a form and retrieve the userData

@lucasnetau
Copy link
Collaborator Author

Issue is due to removing these lines

const instance = methods.init(this, methodOrOptions)
      Object.assign(methods, instance)
      return instance

and instance returning the instance as

return { ...methods.instance, ...methods }

@lucasnetau
Copy link
Collaborator Author

@kevinchappell this commit #1221 introduced the breaking change in API to src/js/form-render.js

@Kit105
Copy link

Kit105 commented Mar 23, 2022

Facing the same issue as mentioned by @lucasnetau
Unable to fetch any user data after the commit. Any alternative way to fetch the userData?

kevinchappell added a commit that referenced this issue Mar 24, 2022
@kevinchappell
Copy link
Owner

@lucasnetau thanks for finding this. just opened #1289 to fix

github-actions bot pushed a commit that referenced this issue Mar 25, 2022
## [3.8.3](v3.8.2...v3.8.3) (2022-03-25)

### Bug Fixes

* formRender api ([05a3476](05a3476)), closes [#1279](#1279)
@kevinchappell
Copy link
Owner

🎉 This issue has been resolved in version 3.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants