Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Value not getting inserted in formData via Custom Field #128

Open
bhavinpankanis opened this issue Jan 12, 2018 · 0 comments
Open

Value not getting inserted in formData via Custom Field #128

bhavinpankanis opened this issue Jan 12, 2018 · 0 comments

Comments

@bhavinpankanis
Copy link

bhavinpankanis commented Jan 12, 2018

I am able to retrieve the updated value but its not inserting in formdata {}. Please provide input

My code is as follows:

handleChange(event){
var value = event.nativeEvent.text;

    this.setState({value:value});
 
    console.log('value',value)

    // This updates values in form everytime i update 
    if(this.props.onChange)      this.props.onChange(this.props.fieldRef, value);
    if(this.props.onValueChange) this.props.onValueChange(value);
    console.log('handleChange',formData)
  }

return
<View style={{ flexDirection: "row" }}>

{name}


<TextInput
{...this.props}
ref={name}
style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
onChange={this.handleChange.bind(this)}
editable={true}
placeholder={placeHolder}
value={value}
style={styles.TextInputStyleClass}
/>


var styles = StyleSheet.create({
MainContainer: {
// Setting up View inside content in Vertically center.
justifyContent: 'center',
flex: 1,
margin: 10
},
TextInputStyleClass: {
textAlign: 'center',
height: 50,
borderWidth: 2,
borderColor: '#FF5722',
borderRadius: 20,
backgroundColor: "#FFFFFF"
},
baseText: {
fontFamily: 'Cochin',
},
});

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

No branches or pull requests

1 participant