wise-white
wise-white3mo ago

Button click not working

Hello All, I have a form that suddenly doesn' t work I have been upgrading the project to 4 and am pretty sure it was working after a upgrade for a while. Clicking the button doesn't do anything at all.
return (
<Form key="UploadDocumentForm" onSubmitCapture={(handleSubmit(onSubmit))}>
<Form.Item
label="Assignee: "
name="fullName"
id="fullName"
rules={[{ required: true, message: 'Please input assignee name!' }]}
>
<Input />
</Form.Item>

<CreateButton value="Submit" disabled={isUploading} />
</Form >
);
};
return (
<Form key="UploadDocumentForm" onSubmitCapture={(handleSubmit(onSubmit))}>
<Form.Item
label="Assignee: "
name="fullName"
id="fullName"
rules={[{ required: true, message: 'Please input assignee name!' }]}
>
<Input />
</Form.Item>

<CreateButton value="Submit" disabled={isUploading} />
</Form >
);
};
I am using Form tag from antd and useForm hook for react-hook. Thanks for your help!
2 Replies
rare-sapphire
rare-sapphire3mo ago
Please suggest
extended-salmon
extended-salmon3mo ago
Does the CreateButton have htmlType='submit' on it? (I think that is the right tag)