staff_documents {document_no aaa, document_type aaa, document_url aaa}

in form i want pass staff_documents field as array of object
5 Replies
adverse-sapphire
adverse-sapphireOP3y ago
@alicanerdurmaz can u help me with these
jolly-crimson
jolly-crimson3y ago
@rehan1 Hi, https://4x.ant.design/components/form/#components-form-demo-dynamic-form-items is this what you looking for ?
<Form.Item name={["document", "no"]}>
<Input placeholder="no" />
</Form.Item>
<Form.Item name={["document", "type"]}>
<Input placeholder="type" />
</Form.Item>
<Form.Item name={["document", "url"]}>
<Input placeholder="url" />
</Form.Item>
<Form.Item>
<Form.Item name={["document", "no"]}>
<Input placeholder="no" />
</Form.Item>
<Form.Item name={["document", "type"]}>
<Input placeholder="type" />
</Form.Item>
<Form.Item name={["document", "url"]}>
<Input placeholder="url" />
</Form.Item>
<Form.Item>
when you write like this, form value will be
{
document: {
no: "123"
type: "123"
url: "12123"
}
}
{
document: {
no: "123"
type: "123"
url: "12123"
}
}
adverse-sapphire
adverse-sapphireOP3y ago
document:[] document:[{no:"1",type:"ss",url:"dd"}] i need this way to pass
adverse-sapphire
adverse-sapphireOP3y ago
ill try and let u know

Did you find this page helpful?