function template_preprocess_signature_canvas in SignatureField 1.x
Prepare the variables for the signature canvas template.
Parameters
array $variables: An associative array of variables:
- id: the canvas ID.
- width: the canvas width in pixels.
- height: the canvas height in pixels.
File
- ./
signaturefield.module, line 32 - Main module file.
Code
function template_preprocess_signature_canvas(array &$variables) {
$variables['attributes']['id'] = $variables['id'];
$variables['attributes']['style'] = 'width: ' . $variables['width'] . 'px; height: ' . $variables['height'] . 'px;';
}