You are here

README.txt in SignatureField 6

Same filename and directory in other branches
  1. 7.2 README.txt
  2. 7 README.txt
-- SUMMARY --

SignatureField allows you to collect HTML5 canvas based signatures in webform,
cck and in your custom modules via fapi. It then displays the signature as a png file.

It achieves this using the Signature Pad jQuery plugin from:
http://thomasjbradley.ca/lab/signature-pad


-- REQUIREMENTS --

* Libraries API http://drupal.org/project/libraries

-- INSTALLATION --

* Download Signature Pad from:
  https://github.com/thomasjbradley/signature-pad/zipball/master
  and extract contents to libraries/signature-pad
* Install and enable Libraries API module
* Install and enable SignatureField module

-- CONFIGURATION --

* Create a webform, content type or custom form with a signaturefield and
  configure settings per field.

-- EXAMPLE CUSTOM FORM --

function signaturefield_menu() {
  $items = array();

  $items['test'] = array(
    'title' => "test",
    'page callback' => 'drupal_get_form',
    'page arguments' => array('signaturefield_test_form'),
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

  return $items;
}

function signaturefield_test_form($form_state){
  $form = array();

  $form['test'] = array(
    '#title' => 'Test Form',
    '#type' => 'signaturefield',
    '#color' => '#0f0',
  );
  $form['test2'] = array(
    '#value' => 'Submit',
    '#type' => 'submit',
  );
  $form['#submit'] = array('signaturefield_test_form_submit');

  if (!empty($form_state['storage'])){
    $form = array();
    $form['test'] = array('#value' => theme('signaturefield_display', $form_state['storage']['signature']));
  }

  return $form;

}

function signaturefield_test_form_submit($form, &$form_state){
  $form_state['storage']['signature'] = $form_state['values']['test'];
}

-- CONTACT --

Current maintainers:
* Brian Gilbert (realityloop) - http://drupal.org/user/139189

This project has been developed by:
* Realityloop Pty Ltd
  Helping plan, prepare, implement and deploy Drupal solutions tailored to your needs.
  Visit http://www.realityloop.com for more information.

File

README.txt
View source
  1. -- SUMMARY --
  2. SignatureField allows you to collect HTML5 canvas based signatures in webform,
  3. cck and in your custom modules via fapi. It then displays the signature as a png file.
  4. It achieves this using the Signature Pad jQuery plugin from:
  5. http://thomasjbradley.ca/lab/signature-pad
  6. -- REQUIREMENTS --
  7. * Libraries API http://drupal.org/project/libraries
  8. -- INSTALLATION --
  9. * Download Signature Pad from:
  10. https://github.com/thomasjbradley/signature-pad/zipball/master
  11. and extract contents to libraries/signature-pad
  12. * Install and enable Libraries API module
  13. * Install and enable SignatureField module
  14. -- CONFIGURATION --
  15. * Create a webform, content type or custom form with a signaturefield and
  16. configure settings per field.
  17. -- EXAMPLE CUSTOM FORM --
  18. function signaturefield_menu() {
  19. $items = array();
  20. $items['test'] = array(
  21. 'title' => "test",
  22. 'page callback' => 'drupal_get_form',
  23. 'page arguments' => array('signaturefield_test_form'),
  24. 'access arguments' => array('access content'),
  25. 'type' => MENU_CALLBACK,
  26. );
  27. return $items;
  28. }
  29. function signaturefield_test_form($form_state){
  30. $form = array();
  31. $form['test'] = array(
  32. '#title' => 'Test Form',
  33. '#type' => 'signaturefield',
  34. '#color' => '#0f0',
  35. );
  36. $form['test2'] = array(
  37. '#value' => 'Submit',
  38. '#type' => 'submit',
  39. );
  40. $form['#submit'] = array('signaturefield_test_form_submit');
  41. if (!empty($form_state['storage'])){
  42. $form = array();
  43. $form['test'] = array('#value' => theme('signaturefield_display', $form_state['storage']['signature']));
  44. }
  45. return $form;
  46. }
  47. function signaturefield_test_form_submit($form, &$form_state){
  48. $form_state['storage']['signature'] = $form_state['values']['test'];
  49. }
  50. -- CONTACT --
  51. Current maintainers:
  52. * Brian Gilbert (realityloop) - http://drupal.org/user/139189
  53. This project has been developed by:
  54. * Realityloop Pty Ltd
  55. Helping plan, prepare, implement and deploy Drupal solutions tailored to your needs.
  56. Visit http://www.realityloop.com for more information.