# dgtek-contact-form

> Component for npm registry

Latest version **0.0.1** (published 2020-09-10) · 0 weekly downloads

## Install

```sh
npm install dgtek-contact-form
pnpm add dgtek-contact-form
yarn add dgtek-contact-form
bun add dgtek-contact-form
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-09-10 |
| First published | 2020-09-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 7.2 MB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | garevna |
| Maintainers | garevna |
| Keywords | dgtek, contact, component, npm, registry, form |

## Links

- npm: https://www.npmjs.com/package/dgtek-contact-form
- Repository: https://github.com/garevna/dgtek-components/tree/contact-form
- npm.io page: https://npm.io/package/dgtek-contact-form

## Dependencies (5)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vuetify](https://npm.io/package/vuetify.md) ^2.2.11
- [dgtek-popup](https://npm.io/package/dgtek-popup.md) ^0.0.5
- [dgtek-styles](https://npm.io/package/dgtek-styles.md) ^0.0.8

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-09-10

## README

# dgtek-contact-form

This component is designed to be utilized in dgtek.net projects only.

It can't be used outside the dgtek.net and landing pages of dgtek.net

#### Warning:

This component uses **dgtek-popup** component

You should install it for the normal work of Contact Form:

```
yarn add dgtek-popup
```

and then import it in your app:
```
import dgtek-popup
```

____________________________________________

## install component
```
yarn add dgtek-contact-form
```

### Load the component and it's styles

App.vue
```
import 'dgtek-contact-form'
import 'dgtek-contact-form/dist/dgtek-contact-form.css'
```

### Use the component

```
<UserContact
    :userForm="userForm"
    :emailSubject="emailSubject"
    :emailText="emailText"
    :emailEndpoint="emailEndpoint"
/>
```

#### emailEndpoint

Backend API endpoint to send data from the form

_____________________________________________

## userForm
###### Fields of Form

For normal work this component waits for the **userForm** object

This object should contain such a props:

* title (string)
* button (string)
* fieldsToShow (array of objects)

**button** prop is the text that will be shown on the submit button face

#### fieldsToShow

is array of objects

Each object describes the form field
```
{
  placeholder: '...', /* String | required */
  type: '...', /* String | required! */
  required: false, /* Boolean */
  available: [...] /* Array of available values for the field | optional, for combo and list types only */
}
```

#### Field types

* text - simple text input field
* number - simple number input field
* email - input field with validation
* postcode - input field with validation of australian post codes
* state - selection field with validation of australian states
* phone - field with validation of australian phone numbers
* date
* time (AM/PM)
* combo - input field with validation from the list of available values (_**available**_)
* list - selection field from the list of available values (_**available**_)
* message - textarea

---
_Source: https://npm.io/package/dgtek-contact-form · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
