2

I have been using silverstripe lately, (loving it) but have come a a point where I need to be able to use what I would call a Dynamic/Continuous form. (I'm told this is similar to Wordpress's Advanced Custom Fields)

What I need to be able to do, is have a CMS form field, and when the user enters information into it, and a new empty form field then appears, for them to enter more text in if they need to, and carry on creating more fields as they are used. (And if possible this in a group of fields, eg, two text fields, or a text field and an image.)

Examples of where I would like to use this: A tab in the backend of the page, where my client can add Question and Answer to a FAQ section. And so they don't have to worry about any formatting, I'd like a "Q" text field, and an "A" text field. and then when they are either full, (or we have an option to create a new one with a button,) another two fields appear. for them to add another Q and A if they wish to.

The other place I am trying to do the same thing is with an image slider on the home page, so the client could select an image, and write optional text to appear under it, and again, when they have added one, a second appears for them to use, etc.

For both of these im after a loop to run on the template to display their data formatted as required in the HTML.

Any ideas would be appreciated. Thanks.

  • 1
    You can do this by programming custom `Page` types with relationships to custom `DataObject` types. Here is an example of a `HomePage` with multiple `Slides`: http://stackoverflow.com/questions/14432739/silverstripe-uploadify-add-fields/14432868#14432868 – 3dgoo Jun 07 '16 at 04:17
  • Thank you! I shall play around with that, and great example too. Looks like we were after exactly the same thing. Thanks! – Michael Lissant-Clayton Jun 07 '16 at 04:49

1 Answers1

0

One of the following modules should do you:

http://addons.silverstripe.org/add-ons/silverstripe/userforms

Userforms allows CMS authors to create custom forms, with custom validation, help-text, sections etc etc.

Apart from frontend stlying, this is pretty much a plug and play module (save for the in-CMS form creation)

http://addons.silverstripe.org/add-ons/silverstripe/multiform

This module requires some custom development and allows you to create multi-page (multi-step) forms.

theruss
  • 1,690
  • 1
  • 12
  • 18