You are here

README.txt in SignatureField 7.2

Same filename and directory in other branches
  1. 6 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 --

1- Download Libraries and Enable
2- Create a directory sites/all/libraries/signature-pad (and sites/all/libraries if you just installed libraries for
   the first time)
3- Download the Signature Pad library into sites/all/libraries/signature-pad
4- Unzip the latest version of Signature Pad. If it unzips the library into a new directory, move the contents of the
   new directory into sites/all/libraries/signature-pad
8- Download 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, &$form_state){
  $form = array();

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

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

  return $form;

}

function signaturefield_test_form_submit($form_id, &$form_state){
  $form_state['signaturefield']['signature'] = $form_state['input']['test'];
}

-- CONTACT --

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

* 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. 1- Download Libraries and Enable
  10. 2- Create a directory sites/all/libraries/signature-pad (and sites/all/libraries if you just installed libraries for
  11. the first time)
  12. 3- Download the Signature Pad library into sites/all/libraries/signature-pad
  13. 4- Unzip the latest version of Signature Pad. If it unzips the library into a new directory, move the contents of the
  14. new directory into sites/all/libraries/signature-pad
  15. 8- Download and Enable SignatureField module
  16. -- CONFIGURATION --
  17. * Create a webform, content type or custom form with a signaturefield and
  18. configure settings per field.
  19. -- EXAMPLE CUSTOM FORM --
  20. function signaturefield_menu() {
  21. $items = array();
  22. $items['test'] = array(
  23. 'title' => "test",
  24. 'page callback' => 'drupal_get_form',
  25. 'page arguments' => array('signaturefield_test_form'),
  26. 'access arguments' => array('access content'),
  27. 'type' => MENU_CALLBACK,
  28. );
  29. return $items;
  30. }
  31. function signaturefield_test_form($form, &$form_state){
  32. $form = array();
  33. $form['test'] = array(
  34. '#title' => 'Test Form',
  35. '#type' => 'signaturefield',
  36. '#color' => '#0f0',
  37. );
  38. $form['submit'] = array(
  39. '#value' => 'Submit',
  40. '#type' => 'submit',
  41. );
  42. if (!empty($form_state['signaturefield']['signature'])){
  43. $form['test'] = array('#value' => theme('signaturefield_display', $form_state['signaturefield']['signature']));
  44. }
  45. return $form;
  46. }
  47. function signaturefield_test_form_submit($form_id, &$form_state){
  48. $form_state['signaturefield']['signature'] = $form_state['input']['test'];
  49. }
  50. -- CONTACT --
  51. Current maintainers:
  52. * Brian Gilbert (realityloop) - http://drupal.org/user/139189
  53. * Realityloop Pty Ltd
  54. Helping plan, prepare, implement and deploy Drupal solutions tailored to your needs.
  55. Visit http://www.realityloop.com for more information.