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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

Self spawning fields


Go to End


2 Posts   1995 Views

Avatar
mmilo

Community Member, 9 Posts

20 November 2007 at 10:09pm

Hello again. I was wondering if it was possible to create a set of admin fields that would self spawn?

For instance I would like to create a page that contains a list of items, each page might contain a variable amount of items. I would like a fieldset that starts off with one text field and a button to add more depending on how many items were required on the page.

I anticipate that the answer is no, but I figure it wouldn't hurt to ask.

Avatar
Sean

Forum Moderator, 922 Posts

25 November 2007 at 12:27pm

Sure, why not - there's a field called TableField that allows you to add multiple records (or rows of a table) inside a single TableField.

This is a similar field to the one that manages the member table in the Security section of the CMS, as well as the one in the Files & Images.

http://doc.silverstripe.com/doku.php?id=tablefield

There's also ComplexTableField for more advanced tabular data management. They're documented in the SilverStripe wiki, as linked above.

Hope this helps,

Sean