2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

image

andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  • Monday, July 16, 2018
  • by andrewhaine
  • Repository
  • 1 Watchers
  • 1 Stars
  • 367 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 20 Versions
  • 11 % Grown

The README.md

Silverstripe Form Capture

Provides a method to capture simple Silverstripe forms and a friendly admin interface for users., (*1)

, (*2)

Installation

composer require bigfork/silverstripe-form-capture

After installing you will need to run 'dev/build'., (*3)

Usage

To store submissions from a form simply call $form->captureForm() in your form handler method. See the example below for usage:, (*4)

Example

In the page controller:, (*5)

public function MyForm()
{
    $fields = FieldList::create(
        TextField::create('Name'),
        EmailField::create('Email'),
        TextareaField::create('Enquiry')
    );

    $actions = FieldList::create(
        FormAction::create('doMyForm', 'Submit')
    );

    $form = Form::create($this, __FUNCTION__, $fields, $actions);

    return $form;
}

public function doMyForm($data, $form)
{
    $form->captureForm(
        'Enquiry form submission', // Required - type of form submission
        'Name', // Required (can be null) - form field containing the submitter's name
        'Email', // Required (can be null) - form field containing the submitter's email address
        ['Captcha'], // Optional - list of fields that shouldn't be stored
        ['Enquiry'] // Optional - list of fields to show in "Details" column in CMS
    );

    // Other processing
}

When capturing a form some useful information is returned which can be used in the controller. For example a link is returned to the submission area in the CMS., (*6)

$capturedSubmission = $form->captureForm('Contact form', null, null);

echo($capturedSubmission['Link']);
// http://your-site.com/admin/<Link to exact submission>

Clearing old submissions

You can use the ClearOldSubmissionsTask to automatically delete form submissions older than a pre-defined age. To use this task, you must first configure the maximum age of form submissions:, (*7)

Bigfork\SilverstripeFormCapture\Tasks\ClearOldSubmissionsTask:
  max_age_days: 90

Credit

Thank you to Andrew Haine for building the original Silverstripe Form Capture module and allowing us to take over maintenance & development., (*8)

The Versions

16/07 2018

dev-master

9999999-dev http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

16/07 2018

2.2.1

2.2.1.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/04 2018

2.2.0

2.2.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/04 2018

1.0.x-dev

1.0.9999999.9999999-dev http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/04 2018

1.1.0

1.1.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/04 2018

dev-ss3-return-capture-id

dev-ss3-return-capture-id http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

21/03 2018

2.1.0

2.1.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/02 2018

1.0.2

1.0.2.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

29/01 2018

1.0.1

1.0.1.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

29/01 2018

2.0.2

2.0.2.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

29/01 2018

dev-patch-remove-ss4-buttons

dev-patch-remove-ss4-buttons http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

29/01 2018

dev-patch-remove-buttons

dev-patch-remove-buttons http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

28/11 2017

2.0.1

2.0.1.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

27/11 2017

2.0.0

2.0.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

27/11 2017

1.0

1.0.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

07/07 2017

0.2.3

0.2.3.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

10/06 2017

dev-SS4-Compatibility

dev-SS4-Compatibility http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

24/05 2017

0.2.1

0.2.1.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

19/05 2017

0.2.0

0.2.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture

08/05 2017

0.1.0

0.1.0.0 http://github.com/andrewhaine/silverstripe-form-capture

Provides a method to capture simple silverstripe forms and a friendly admin interface for users

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms capture