score:1
you're not passing the right name
s to the form.input
components which the handlechange
function uses to update the state. they have to be 'assessment_name'
and 'assessment_type'
respectively to make sure the state gets updated on input change events and the new values get reflected on the fields.
<>
<form.input
name="assessment_name"
value={assessment_name}
onchange={this.handlechange}
label="assessment name"
required
/>
<form.input
name="assessment_type"
value={assessment_type}
onchange={this.handlechange}
label="assessment type"
required
/>
</>
Source: stackoverflow.com
Related Query
- React on Rails: Can't enter text in my form input boxes
- React prevent form submission when enter is pressed inside input
- React form error changing a controlled input of type text to be uncontrolled
- React useState hooks - Text input loses focus when typing if passing form through props
- React Form register input value and text
- Getting state of a text input when pressing enter key in React
- Cant type in an input field of a form in React js
- React live update input text form
- React TypeScript Cant update custom input text value
- How to stop displaying error when data inside text input was set like this: value={value} React Hook Form
- React Hook update input field: text is invisible until user press enter
- Input text in react form component does not allow text entry
- How to create a form with text and file input in react and send form data to server using Nodejs?
- How to send a form input data containing both image and text from React front-end to Express backend using Multer
- Why I cant share info between form input (child component) and React useState Hook (parent component)?
- I cant validate this react form from adding values to input from browser console
- Can't type in React input text field
- How to align text input correctly in react native?
- React - clearing an input value after form submit
- Updating a React Input text field with the value on onBlur event
- Clear form input field values after submitting in react js with ant-design
- Passing react text field input values as parameters to a method
- How to clear input values of dynamic form in react
- React text input loses focus when I type a letter
- Android - Hide text cursor input React Native
- How to get form data from input fields in React
- How to limit the text filed length with input type number in React JS and prevent entry of E,e, -, + etc
- React Native - Unable to create text input
- Validation of form input fields in React
- Test text input with react and jest
More Query from same tag
- Getting Unhandled Rejection (TypeError)
- when I have multiple use effects which useeffect cleanup function will be called
- React Router Dom V6 pass array to path
- Jest + react-testing-library: Warning update was not wrapped in act()
- How to re-render or update component after componentdidmount
- Redundant piece of code using React hooks
- React - Pass multiple option arguments/values onChange
- (react,antd,card) How can I block the onclick function from action buttons with antd card component?
- ReactJS firebase auth displayName return null
- Show boolean values in table using semantic-ui-react
- how did an empty useState array match with the data?
- Getting error : Unknown argument "id" on field "user" of type "Query" [GraphQL, Relay, React]
- React - Show Alert each time I click on an image
- (Yup) how to create multiple errors using a single .test() function
- Spread operator in react is causing each character to be saved in it's own array, when updating in firebase
- Error trying to render an array of objects from the database
- Focus Select element
- When returning content from getInitialProps, is there a method to check for empty?
- Change color based on a keys value in each object of array
- React.js How to loop through multiple API data arrays and add data to table
- CSS/JSX: Fixing two HTML canvas within a div with relative width as 60% and 40%
- React debug Using VSCode and Firefox instead of Chrome
- Is it safe to pass undefined in React's onClick?
- Passing props - React
- onFocus bubble in React
- Calculating price returning NaN in React
- Disabled button based on React input fields not working properly
- setting state in handle scroll is showing previous state - react hooks, throttle and redux
- How to remove default option in toolbar of react-draft-wysiwyg?
- Could not find a declaration file for module 'gatsby-plugin-dark-mode'