vicious-gold
vicious-gold2y ago

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
vicious-gold
vicious-gold2y ago
@alicanerdurmaz can u help me with these
genetic-orange
genetic-orange2y 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"
}
}
vicious-gold
vicious-gold2y ago
document:[] document:[{no:"1",type:"ss",url:"dd"}] i need this way to pass
vicious-gold
vicious-gold2y ago
ill try and let u know