If I have a CMS that I want lets say... cycle through a number of quotes... is there a way I can have 3 fields laid out to start, then give the user the ability to add field 4,5,6,7,8,9,... while they're in it?
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.
maybe i'm not explaining this well.
a way to have a "+" button that will add an additional field to the current section you're editing. (not to a form on the page, but extra data) is this even possible?
You probably want to look at using a TableField of some sort - http://doc.silverstripe.com/doku.php?id=tablelistfield
You can make a DataObject of a 'Quote' then a table field of quotes. This will give you the ability to add / remove quotes
Less than clear on this. This'll set it up in the CMS? How do I apply this function to create new fields in the CMS dynamically ?
Sorry I cant expand anymore on that, running between things at the moment. Have a look at the tutorial tho. http://doc.silverstripe.com/doku.php?id=tutorial:5-dataobject-relationship-management . Ill post an example when I have a sec!
Hi Matt,
Yeah, this is perfectly feasible ... It'll take some (minor) programming, but no problem..
Have a look at the tutorial Will posted and it'll get clear.
Hey Matt,
I have written up a quick tutorial for you on the wiki - http://doc.silverstripe.com/doku.php?id=recipes:example_of_quotes_on_a_page . The code you need to get it to work is pretty small as you can see I just tried to expand it a bit. Let me know if you have any questions
I will also attach my code to the page for you.
Very cool write-up Will ! I'm sure this'll help a lot of people !