PHPackages                             zetrider/nova-inputs-field - 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. zetrider/nova-inputs-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zetrider/nova-inputs-field
==========================

A Laravel Nova field.

1.0.1(4y ago)124MITPHPPHP &gt;=7.1.0

Since Oct 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zetrider/NovaInputsField)[ Packagist](https://packagist.org/packages/zetrider/nova-inputs-field)[ RSS](/packages/zetrider-nova-inputs-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Nova Inputs Field
=================

[](#nova-inputs-field)

Multiple fields based on json for Laravel Nova

- Creating multiple fields based on json
- Custom attributes available
- In the arsenal: Input, Select, Checkbox, Radio

Requirements
------------

[](#requirements)

- `php: >=7.1`
- `laravel/nova: ^3.0`

Screenshots
-----------

[](#screenshots)

[![Code example 1](img/1.png)](img/1.png)

[![Form example 1](img/2.png)](img/2.png)

[![Code example 2](img/3.png)](img/3.png)

[![Form example 2](img/4.png)](img/4.png)

Installation
------------

[](#installation)

Install via Composer:

```
composer require zetrider/nova-inputs-field
```

Usage
-----

[](#usage)

### Database

[](#database)

A field in the database should be based on type text.

For example:

```
$table->text('fields')->nullable();
// Or
$table->longText('fields')->nullable();
// Or
$table->json('fields')->nullable();
```

The field stores data in json format.

For example:

```
[{"exampleTest":"Hello","exampleColor":"#005a9e","exampleDate":"2021-10-28","exampleSelect":"value1","exampleMultiple":["value2","value3"],"exampleCheckbox":["value1","value2"],"exampleRadio":"value3"}]
```

Data:

- Key: (string) field key
- Value: (array | string ) - depends on field type and the attribute 'multiple'. Checkbox is always an array.

### Model

[](#model)

Your model should cast field:

```
/**
    * The attributes that should be cast.
    *
    * @var array
*/
protected $casts = [
    'fields' => 'array',
];
```

### Nova resource

[](#nova-resource)

The `NovaInputsField` works like a standard Nova field.

You can use the following methods:

- `input`(string $key, array $attributes)
- `select`(string $key, array $attributes, array $options)
- `checkbox`(string $key, array $attributes, array $options)
- `radio`(string $key, array $attributes, array $options)

`$key` - used as a key in json

`$attributes` - any html attributes supported by the field. The placeholder attribute for checkbox and radio fields is used as a title.

`$options` - options for the field. The array key is value for the option. The array value is the option name.

For example:

```
use ZetRider\NovaInputsField\NovaInputsField;

public function fields(Request $request)
{
    return [
        NovaInputsField::make('Some field', 'fields')
            // Simple text field
            ->input('exampleTest', ['type' => 'text', 'placeholder' => 'Type here...'])
            // Color field
            ->input('exampleColor', ['type' => 'color'])
            // Date field
            ->input('exampleDate', ['type' => 'date', 'min' => now()->format('Y-m-d')])
            // Simple select
            ->select('exampleSelect', ['placeholder' => 'Select option...'], [
                'value1' => 'Option1',
                'value2' => 'Option2',
                'value3' => 'Option3'
            ])
            // Multiple select
            ->select('exampleMultiple', ['placeholder' => 'Select option...', 'multiple' => 'multiple', 'style' => 'height: 100px;'], [
                'value1' => 'Option1',
                'value2' => 'Option2',
                'value3' => 'Option3'
            ])
            // Checkbox
            ->checkbox('exampleCheckbox', ['placeholder' => 'Choice option'], [
                'value1' => 'Check1',
                'value2' => 'Check2',
                'value3' => 'Check3'
            ])
            // Radio
            ->radio('exampleRadio', ['placeholder' => 'Some title'], [
                'value1' => 'Radio1',
                'value2' => 'Radio2',
                'value3' => 'Radio3'
            ]),
    ];
}
```

or

```
NovaInputsField::make('Prices', 'prices')
    ->select('type', [], ['base' => 'Base', 'sale' => 'Sale'])
    ->input('price', ['type' => 'nubmer', 'min' => '1', 'step' => '0.01']),
```

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1655d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e72b39a882893bbe05d9bb53ef88e2d6553d014cffc907777ff65283f5230f2?d=identicon)[ZetRider](/maintainers/ZetRider)

---

Top Contributors

[![zetrider](https://avatars.githubusercontent.com/u/5094201?v=4)](https://github.com/zetrider "zetrider (5 commits)")

---

Tags

laravelfieldnova

### Embed Badge

![Health badge](/badges/zetrider-nova-inputs-field/health.svg)

```
[![Health](https://phpackages.com/badges/zetrider-nova-inputs-field/health.svg)](https://phpackages.com/packages/zetrider-nova-inputs-field)
```

###  Alternatives

[inspheric/nova-url-field

A Laravel Nova URL field.

1031.3M1](/packages/inspheric-nova-url-field)[alexwenzel/nova-dependency-container

A Laravel Nova 4 form container for grouping fields that depend on other field values.

461.0M2](/packages/alexwenzel-nova-dependency-container)[outl1ne/nova-simple-repeatable

A Laravel Nova simple repeatable rows field.

74356.3k](/packages/outl1ne-nova-simple-repeatable)[simplesquid/nova-enum-field

A Laravel Nova field to add enums to resources.

52391.9k2](/packages/simplesquid-nova-enum-field)[sietse85/nova-button

(Nova 4+) A Laravel Nova package for adding buttons to your resources.

37347.3k](/packages/sietse85-nova-button)[optimistdigital/nova-notes-field

This Laravel Nova package adds a notes field to Nova's arsenal of fields.

52139.5k](/packages/optimistdigital-nova-notes-field)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
