How to submit search form?


Topic: How to submit search form?

michaelxin pro asked 7 years ago

I have this: <FormInline waves> <divclassName="md-form my-0"onSubmit={this.searchHandler}> <inputclassName="form-control form-control-md"type="search"placeholder="Search..."aria-label="Search"/> </div> </FormInline> How to make on submit on this form pls?

Mikołaj Smoleński staff answered 7 years ago

Form-inline contains the form tag. You should change Your code like this:
<form>
 <p className="h5 text-center mb-4">Sign in</p>
 <Input label="Type your email" icon="envelope" group type="email" validate error="wrong" success="right"/>
 <Input label="Type your password" icon="lock" group type="password" validate/>
 <div className="text-center">
  <Button type="submit">Login</Button>
 </div>
</form>
Regards

michaelxin pro answered 7 years ago

Can i use it without button so i just press enter to submit? I tried it but it seems does not work :(

michaelxin pro answered 7 years ago

FIxed thx a lot guys you are best!!!
Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No