question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formdata data is not passed to custom field

See original GitHub issue

Prerequisites

Description

[Description of the bug or feature]

Steps to Reproduce

1.Component where Form exists:

const widgets = { myCustomWidget: Measurements, } … Html render: Form fields={fields} schema={schema} uiSchema={uiSchema} formData={formData} widgets={widgets}>

  1. Custom field Measurements: constructor(props) { this.state = {…props.formData,fetchedData:[]}; }

componentDidMount(){ #Want to get the values from the formData here this.props }

Expected behavior

FormData fields data to be passed on custom field.

Actual behavior

They are not passed.

Version

You can usually get this information in your package.json or in the file URL if you’re using the unpkg one.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
epicfaacecommented, Mar 14, 2020

I see… thanks for the explanation @taspapak and the bump @harsimranb. One way you could do this now is to add the formData as part of the formContext. Here’s an example:

https://jsfiddle.net/etn6kw72/

Given that we can already do it this way, I don’t know if there’s a really good reason to give access to formData to custom widgets by default. Given

0reactions
stale[bot]commented, Apr 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ajax: send formData along with custom variable - Stack Overflow
It would seem that whereas the new FormData() call accepts a HTML Form element, the .append() method does not: append. value. The field's...
Read more >
Using FormData Objects - Web APIs | MDN
The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. It is primarily intended for use in sending...
Read more >
Not getting form data on custom Save action form submit
1 Answer 1 ... The "data" string you are referring to holds the configuration of your submit action. This does not contain the...
Read more >
FormData - The Modern JavaScript Tutorial
This chapter is about sending HTML forms: with or without files, with additional fields and so on. FormData objects can help with that....
Read more >
Data is not flowing into Salesforce after Integration - Jotform
Mapping custom fields in Salesforce to fields in your form should be ... the submitted form data for the custom field is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found