You are here

README.txt in SignatureField 7

Same filename and directory in other branches
  1. 6 README.txt
  2. 7.2 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, &$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. * 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, &$form_state){
  30. $form = array();
  31. $form['test'] = array(
  32. '#title' => 'Test Form',
  33. '#type' => 'signaturefield',
  34. '#color' => '#0f0',
  35. );
  36. $form['submit'] = array(
  37. '#value' => 'Submit',
  38. '#type' => 'submit',
  39. );
  40. if (!empty($form_state['signaturefield']['signature'])){
  41. $form['test'] = array('#value' => theme('signaturefield_display', $form_state['signaturefield']['signature']));
  42. }
  43. return $form;
  44. }
  45. function signaturefield_test_form_submit($form_id, &$form_state){
  46. $form_state['signaturefield']['signature'] = $form_state['input']['test'];
  47. }
  48. -- CONTACT --
  49. Current maintainers:
  50. * Brian Gilbert (realityloop) - http://drupal.org/user/139189
  51. * Realityloop Pty Ltd
  52. Helping plan, prepare, implement and deploy Drupal solutions tailored to your needs.
  53. Visit http://www.realityloop.com for more information.