LeanAdmin / feature-discussions

The place for discussing new features
6 stars 0 forks source link

Repeater field #7

Open stancl opened 3 years ago

stancl commented 3 years ago

Should let you add any field an unlimited amount of times and remove previous values.

API:

Repeater::make('column')
    ->field(SomeField::class)
    ->storeValueUsing(function (Repeater $field, SomeField[] $fields) {
        // access the fields as an array
        // return what should be stored in the column
    })

This could also make multi image/file uploads much less of a pain!

molcsab commented 3 years ago

It would come handy in many cases, like multiple phone numbers or addresses for the same model

yo-mike commented 3 years ago

ACF for WordPress actually does a great job with repeater fields.

https://www.advancedcustomfields.com/

Last I checked, I don't think Nova's custom implementations were too useful.

I would love to use a repeater field 👍

stancl commented 2 years ago

A good part of this feature could be specifying how each field is affected when by the presence of other fields, e.g. a repeated select could remove the already selected option from the other selects

mohamedmoussasoli commented 2 years ago

Can it have multiple fields to be repeated?