1

I want to add a in a react semantic UI but it cannot send the checked value to server even after I name Checkbox like this:

<Form.Field
  label="The question is new to the intent library"
  name="newType"
  control={Field}
  component={Checkbox}
/>

This component is inside a form like this:

<Form>
 <Form.Field
  label="Rating"
  control={Field}
  name="rate"
  component={Rating}
  ...
 />
 <That checkbox ... />
 <Form.Field
  label="Comment"
  control={Field}
  name="comment"
  component="textarea"
 />
</Form>

Supposed action should carry the checked value in payload, similar to how rating and comment are carried.

I am stuck in this for half a day Please help me if you notice something. Thanks!

1 Answer 1

1

The problem is solved by using the following code

<Form.Field 
 control={Field}
 label="The question is new to the intent library"
 name="newType"
 component="input"
 type="checkbox"
/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.