Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeater field #7

Open
stancl opened this issue Jan 2, 2021 · 4 comments
Open

Repeater field #7

stancl opened this issue Jan 2, 2021 · 4 comments

Comments

@stancl
Copy link
Member

stancl commented Jan 2, 2021

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
Copy link

molcsab commented Jan 5, 2021

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

@MikeCraig418
Copy link

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
Copy link
Member Author

stancl commented Sep 5, 2021

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
Copy link

Can it have multiple fields to be repeated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants