• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
        • Image Statement
        • Image.load Function
        • Image.save Function
        • Image.width Function
        • Image.height Function
        • Image.resample Function
        • Image.createQRCode Function
        • Image.takePhoto Function
        • Image.captureSignature Function
        • Image.view Function
        • Image.clear Function
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Image.captureSignature Function

Format
b = image_name.captureSignature(ʃmessageʅ);
Description
The Image.captureSignature function allows the drawing of a signature and stores the captured signature in the Image object. This function only works on Android devices. The signature UI includes two options:
  • Save: Tap to save an image of the displayed signature.
  • Clear: Tap to to clear the displayed signature.
The optional string expression message will appear on the Android device's screen while the signature screen is active. The string will not be saved to the image.
Return Value
The function returns a logical value of 1 (true) if a signature was successfully captured and 0 (false) if there was an error capturing a signature or if the operator canceled the operation.
Example
PROC CONSENT

   
// have the respondent sign to confirm that they agreed to this interview
    string consent_filename = Path.concat("Consent Signatures", key(SURVEY_DICT) + ".png");

   
// if the file exists, then they must have already consented on a previous
    // household visit so only take the signature if the file does not exist
    if not fileexist(consent_filename) then

       
string consent_message = "Please sign your name, indicating that you consent to be interviewed for this survey.";
       
Image consent_signature;

       
if not consent_signature.captureSignature(consent_message) then
           
errmsg("The respondent must consent before you can continue.");
           
reenter;
       
endif;

        consent_signature.
save(consent_filename);

   
endif;
See also: Image Object, Image.takePhoto Function