popular-magentaP
Refine2y ago
21 replies
popular-magenta

Refine AntD Form create new records

How do I conventionally code a component that have an antd "Form" with input, map those inputs to each field of the type of that table in the database (I use Supabase), and POST that.

This is the sumarry of my create page, anything I'm missing? Show me a full code of a page how to do this properly.

import { Form, Input, Modal, Select } from 'antd';
export const PatientCreate = () => {
return (
<Modal>
<Form>
<Form.Item><Input/></Form.Item>
</Form>
</Modal>
)}


This is my from my App.tsx:
resources={[{
name: "patient",
list: "/patient",
create: "/patient/create"
}]}>
Was this page helpful?