Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to pass argument in onFinish method in antdesign

import React from 'react';

import { Form, Input, Button } from 'antd';

const FormItem = Form.Item;

class CustomForm extends React.Component {


  handleFormSubmit = (values) => {
    const title = values.title;
    const content = values.content;
    console.log(title, content);
};

  render(){
    return (
      <div>
        <Form onFinish={(values) => this.handleFormSubmit(values)}>

      <FormItem label="Title" name="title">
        <Input  placeholder="Put a title here" />
      </FormItem>

      <FormItem label="Content" name="content">
        <Input  placeholder="Enter some content ..." />
      </FormItem>

      <FormItem >
        <Button type="primary"   htmlType="submit">Submit</Button>
      </FormItem>
    </Form>
  </div>
    );
  }
}

export default CustomForm;
Comment

PREVIOUS NEXT
Code Example
Javascript :: scope hierarchy in angularjs 
Javascript :: get search value from reacr route2 
Javascript :: localstorege remove 
Javascript :: mongoose geospatial Schema Options 
Javascript :: how to redirect from login page to other page if user is already logged in in angular using jwt 
Javascript :: how to replace all words in javascript in hindi 
Javascript :: create localStorage key + value if not exist 
Javascript :: import image in react js 
Javascript :: sorting json array by key in angular 9 
Javascript :: react native getting older version assets 
Javascript :: Get Multipal Tab Value to One App Script 
Javascript :: arrow function no need for curly braces bc just one action 
Javascript :: next field 
Javascript :: navigate to another page on vue js button 
Javascript :: micromodal scrolls to bottom 
Javascript :: how to generate an onclose jest 
Javascript :: react native import virtual path 
Javascript :: tag p is already been closed when there are div tag angular 
Javascript :: reactjs copytoclipboard box 
Javascript :: how to enable button of upload after click on chosefile in jquery 
Javascript :: find short number in array javascript 
Javascript :: take user value and append value in js 
Javascript :: angular validar formulario 
Javascript :: Jasonplaseholder 
Javascript :: wrap three three set div in a single div 
Javascript :: sort string array object javascript 
Javascript :: javascript look array 
Javascript :: how to write text with javascript 
Javascript :: multiple js files vuejs 
Javascript :: cannot find module react scripts 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =