17452 Posts in 4473 Topics by 1971 members
|Go to End|
30 August 2008 at 5:07am
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?
30 August 2008 at 10:18am
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?
30 August 2008 at 11:06am
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
30 August 2008 at 11:35am
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 ?
30 August 2008 at 11:53am
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!
31 August 2008 at 4:33am
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.
31 August 2008 at 12:12pm
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.
1 September 2008 at 10:33am
Very cool write-up Will ! I'm sure this'll help a lot of people !
|Go to Top|