# Introduction 
Form Templates in support of [doiforms](https://www.npmjs.com/package/doiforms)


# Getting Started
1.	Installation process

    install from npm using "npm i doiforms"

    to install the template form library run "npm i bootstrap3formtemplates"
2.	Software dependencies
    * React
    * doiforms
    * react-date-picker
    * react-datetime-picker
    * google-libphonenumber
4.	API references
  Basic usage looks something like this:
```typescript
import { FormTemplate } from "bootstrap3formtemplates";
import {
  DOIFormComponent,
  EnumFieldType,
  IFieldState,
} from "doiforms";
import * as React from "react";

export default function MyForm(): JSX.Element{
    const field = {
      DisplayName: "Your Name",
      Id: "name",
      Name: "name",
      Order: 0,
      Required: true,
      Type: EnumFieldType.text };
    const submit = {
          DisplayName: "Submit",
          Id: "submitb",
          Name: "submitb",
          Order: 1,
          Required: true,
          Type: EnumFieldType.submit
        };
    return <DOIFormComponent        
        ErrorHandler={(ErrorMessage?: string, Stack?: string) => <h1>{ErrorMessage || "Error"}</h1><p>{Stack}</p>}
        Fields={[field,submit]}
        FormTemplate={FormTemplate}
        RedirectURL={"https://localhost"}
        SubmitAction={() => {
          return new Promise<void>(
            (resolve: () => void, reject: (reason: any) => void) => {
              resolve();
            });
        }} />;
}
```

