PHPackages                             sanatorium/inputs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sanatorium/inputs

ActivePlatform-extension[Utility &amp; Helpers](/categories/utility)

sanatorium/inputs
=================

Extended input types

4.3.26(9y ago)00JavaScriptPHP &gt;=5.4.0

Since Mar 12Pushed 9y ago2 watchersCompare

[ Source](https://github.com/rozklad/platform-inputs)[ Packagist](https://packagist.org/packages/sanatorium/inputs)[ RSS](/packages/sanatorium-inputs/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (104)Used By (0)

sanatorium/inputs
=================

[](#sanatoriuminputs)

Extended input types

Documentation
-------------

[](#documentation)

### Available input types

[](#available-input-types)

#### Category

[](#category)

Pick category from tree (to be deprecated &gt;&gt; see Relation).

#### Country

[](#country)

Pick country from list.

#### Date

[](#date)

Date formatted input.

#### Email

[](#email)

E-mail formatted input.

#### File

[](#file)

Pick single file from media library. *child type to Media*

#### Gallery

[](#gallery)

Pick multiple images from media library. *child type to Media*

#### Image

[](#image)

Pick single image from media library. *child type to Media*

#### Media

[](#media)

Pick multiple files from media library, also a parent for File, Gallery, Image, Video.

#### Phone

[](#phone)

Phone formatted input.

#### Relation

[](#relation)

Relation to another entity.

To register new extension, use:

```
try
{
    // Register new relation
    $this->app['sanatorium.inputs.relations']->registerRelation(
        'qualification', 'Sleighdogs\Qualifications\Models\Qualification'
    );
    //
} catch (\ReflectionException $e)
{
    // sanatorium/inputs is not installed or does not support relations
}

```

*Note: Code above has to be booted after sanatorium/inputs for that to work properly, therefore remember to register any extension using this code as dependent on sanatorium/inputs (see block require in extension.php of your extension)*

#### Repeater

[](#repeater)

Multiple input values

#### Scale

[](#scale)

1-100 (to be extended) slider scale input.

#### Switchery

[](#switchery)

One or multiple (allowOptions) checkboxes with "switchery look".

#### Tags

[](#tags)

Multiselect which allows user's with permissions to add new values.

#### Truefalse

[](#truefalse)

Single true/false value.

### URL

[](#url)

URL link input.

#### Video

[](#video)

Pick single video from media library. *child type to Media*

#### WYSIWYG

[](#wysiwyg)

WYSIWYG editor input field.

### Create custom type

[](#create-custom-type)

1. Create new class in Sanatorium\\Inputs\\Types namespace, that might look like this

    ```
