Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to implement repeating fields?


Go to End


2 Posts   1340 Views

Avatar
SilverstripeNewbie

Community Member, 14 Posts

5 October 2015 at 2:28am

How do you implement repeating fields in Silverstripe? For example my user will enter authors for a book, but the number of authors will vary. Any way to let the CMS user add field authors as needed, maybe with a button that says "add more authors"?

Avatar
helenclarko

Community Member, 166 Posts

5 October 2015 at 8:39am

Hi SilverstripeNewbie,

I would suggest looking at has_many relationships and Gridfields.

The link below should give you a starting point.
https://docs.silverstripe.org/en/3.1/tutorials/dataobject_relationship_management/

This should allow you to add multiple authors to a book.

-helenclarko