PHPackages                             itsimplycom/nova-mcm-repeatable-fields - 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. [Templating &amp; Views](/categories/templating)
4. /
5. itsimplycom/nova-mcm-repeatable-fields

ActiveLibrary[Templating &amp; Views](/categories/templating)

itsimplycom/nova-mcm-repeatable-fields
======================================

A Laravel Nova field.

v1.0.1(7y ago)015MITVuePHP &gt;=7.1.0

Since Sep 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/itsimplycom/nova-repeatable-fields)[ Packagist](https://packagist.org/packages/itsimplycom/nova-mcm-repeatable-fields)[ RSS](/packages/itsimplycom-nova-mcm-repeatable-fields/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

A repeatable field for Nova apps
================================

[](#a-repeatable-field-for-nova-apps)

This package contains a Laravel Nova field that enables the creation of repeatable sets of 'sub' fields. Nova users are free to create, reorder and delete multiple rows of data with the sub fields you define. Data is saved to the database as JSON.

Example
-------

[](#example)

[![Nova repeatable field set on Nova form view](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/repeatable-fields.gif)](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/repeatable-fields.gif)

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

[](#installation)

You can install this package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require fourstacks/nova-repeatable-fields
```

Usage
-----

[](#usage)

To add a repeater field, use the `Fourstacks\NovaRepeatableFields\Repeater` field in your Nova resource:

```
namespace App\Nova;

use Fourstacks\NovaRepeatableFields\Repeater;

// ...

class Petstore extends Resource
{
    // ...

    public function fields(Request $request)
    {
        return [
            // ...

            Repeater::make('Dogs'),

            // ...
        ];
    }
}
```

In order to use this package you should also ensure the Eloquent model that your Nova resource represents, is casting the attribute you wish to use a repeater field for, to an array:

```
namespace App;

// ...

class Petstore extends Model
{
    protected $casts = [
        'dogs' => 'array'
    ]
}
```

The underlying database field should be either a `string` or `text` type field.

Configuration
-------------

[](#configuration)

This package comes with various options that you can use to define the sub fields within your repeater and

#### addField

[](#addfield)

Parameters: `array`

Every repeater field you create should contain at least one sub field added via `addField`. The `addField` method accepts an array of sub field configuration options:

```
Repeater::make('Dogs')
    ->addField([
        // configuation options
    ])

```

Configuration options are:

##### label

[](#label)

```
[
    'label' => 'Dog name',
    //...
]
```

All sub fields must, at a minimum, be defined with a 'label'. This is a human-readable string that will appear in the Nova UI.

##### name

[](#name)

```
[
    'name' => 'dog_name',
    //...
]
```

By default, the `name` of the sub field (used when saving the data in the database) will be generated automatically using a snake case version of the sub field `label`. Alternatively you are free to override this convention and define a custom name to be used.

##### type

[](#type)

```
[
    'type' => 'number',
    //...
]
```

By default, the input type of the sub field will be a standard text field. You are free to define a different field type if you wish. Currently supported sub field types are: 'text', 'number', 'select'.

##### placeholder

[](#placeholder)

```
[
    'placeholder' => 'Name that dog',
    //...
]
```

By default, the input `placeholder` will be the same as the sub field `label`. However you are free to define a custom placeholder using this option that will appear instead.

```
[
    'width' => 'w-1/2',
    //...
]
```

If you choose to display your sub fields in a row (rather than stacked - see the `displayStackedForm` option below) you can define the widths of your fields using [Tailwind's fractional width classes](https://tailwindcss.com/docs/width/#app). You do not need to define widths for all your fields unless you want to. If no widths are entered for any sub fields all sub fields will be the same width.

If you are displaying your sub fields in a stacked layout then width options will have no effect.

##### options

[](#options)

```
[
    'options' => [
        'fido' => 'Fido',
        'mr_bubbles' => 'Mr Bubbles',
        'preston' => 'Preston'
    ]',
    //...
]
```

If the `type` of the sub field you are defining is 'select', you will need to define an array of options for the select field. These are defined using an array of key/value pairs.

#### addButtonText

[](#addbuttontext)

```
Repeater::make('Dogs')
    ->addButtonText('Add new dog');
```

You are free to configure the text for the button used to add a new set of sub fields in the Nova UI. By default this button is labelled 'Add row' but you can override this using the `addButtonText` option.

#### summaryLabel

[](#summarylabel)

```
Repeater::make('Dogs')
    ->summaryLabel('Dogs');
```

The detail and index views show a summary of the data inputted using the repeater field. By default this will show the count of the rows e.g. '3 rows' along with a link to expand to show the full data that was inputted:

[![Nova repeatable field set on Nova index view - collapsed state](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-index-collapsed.png)](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-index-collapsed.png)

You can overrides this summary text to something more specific e.g. '3 dogs':

[![Nova repeatable field set on Nova index view - expanded state](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-index-expanded.png)](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-index-expanded.png)

#### displayStackedForm

[](#displaystackedform)

```
Repeater::make('Dogs')
    ->displayStackedForm();
```

By default, a set of sub fields will appear as a series of horizontally aligned input fields:

[![Nova repeatable field set on Nova form view - default horizontal fields](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-horizontal-form.png)](https://raw.githubusercontent.com/fourstacks/nova-repeatable-fields/master/screenshot-horizontal-form.png)

This works well for repeater fields with only 2 or 3 sub fields, however for larger field sets a stacked form that displays repeater sub fields above one another will generally be a more usable layout. You can switch to a stacked layout using this option.

#### initialRows

[](#initialrows)

```
Repeater::make('Dogs')
    ->initialRows(4);
```

Sets the initial number of rows that will be pre-added on form initialization. For forms with existing rows, it will append up to the set number of rows.

#### maximumRows

[](#maximumrows)

```
Repeater::make('Dogs')
    ->maximumRows(4);
```

Sets the maximum number of rows as the upper limit. Upon reaching this limit, you will not be able to add new rows.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [John Wyles](https://github.com/fourstacks)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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 ~5 days

Total

5

Last Release

2787d ago

Major Versions

v0.1.0 → v1.0.12018-09-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/c81ba66f3ec6825eadcf3b4db7c2afd156884dca09bc74cc2dc0e7bf7d4c2fe4?d=identicon)[ngi](/maintainers/ngi)

---

Top Contributors

[![fourstacks](https://avatars.githubusercontent.com/u/6280211?v=4)](https://github.com/fourstacks "fourstacks (28 commits)")[![afollador92](https://avatars.githubusercontent.com/u/31884745?v=4)](https://github.com/afollador92 "afollador92 (5 commits)")[![ilyasfoo](https://avatars.githubusercontent.com/u/3747241?v=4)](https://github.com/ilyasfoo "ilyasfoo (3 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/itsimplycom-nova-mcm-repeatable-fields/health.svg)

```
[![Health](https://phpackages.com/badges/itsimplycom-nova-mcm-repeatable-fields/health.svg)](https://phpackages.com/packages/itsimplycom-nova-mcm-repeatable-fields)
```

###  Alternatives

[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[outl1ne/nova-multiselect-field

A multiple select field for Laravel Nova.

3402.9M2](/packages/outl1ne-nova-multiselect-field)[emilianotisato/nova-tinymce

This Nova package allow you to use TinyMCE editor for text areas.You can customize the editor options and... you can upload images to your server and put them rigth there on the text without leaving the text editor!

116884.3k4](/packages/emilianotisato-nova-tinymce)[silvanite/novafieldcheckboxes

A Laravel Nova field to display a number of multi-select options using checkboxes.

70846.9k1](/packages/silvanite-novafieldcheckboxes)[waynestate/nova-ckeditor4-field

This nova package allows you to use CKEditor 4 for text areas.

62739.1k8](/packages/waynestate-nova-ckeditor4-field)[saumini/ellipsis-textarea

A Laravel Nova textarea field with ellipsis support

12146.9k](/packages/saumini-ellipsis-textarea)

PHPackages © 2026

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