\Kendo\UI\Signature

A PHP wrapper for Kendo UI Signature.

Inherits from \Kendo\UI\Widget.

Usage

To use Signature in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo Signature

<?php
// Create a new instance of Signature and specify its id
$signature = new \Kendo\UI\Signature('Signature');

// Configure it
$signature->backgroundColor('value')

// Output it

echo $signature->render();
?>

Methods

backgroundColor

Gets or sets the background color of the signature.

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->backgroundColor('value');
?>

change

Fired when the value of the widget is changed by the user.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the change event documentation.

Returns

\Kendo\UI\Signature

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

close

Fired when the value popup of the component is changed For additional information check the close event documentation.

Returns

\Kendo\UI\Signature

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->close('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onClose(e) {
        // handle the close event.
    }
</script>
<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->close('onClose');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

color

The stroke color of the signature.

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->color('value');
?>

enable

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

Returns

\Kendo\UI\Signature

Parameters

$value boolean

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->enable(true);
?>

fillMode

Sets a value controlling how the color is applied. Can also be set to the following string values: "solid"; "flat"; "outline" or "none".

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->fillMode('value');
?>

height

Determines the height of the signature in pixels.

Returns

\Kendo\UI\Signature

Parameters

$value float

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->height(1);
?>

hideLine

A value indicating whether the dotted line should be displayed in the background.

Returns

\Kendo\UI\Signature

Parameters

$value boolean

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->hideLine(true);
?>

label

Specifies the label that will be rendered on the k-signature-canvas element of the component with the aria-label attribute.

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->label('value');
?>

maximizable

A value indicating whether the component can be maximized

Returns

\Kendo\UI\Signature

Parameters

$value boolean

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->maximizable(true);
?>

open

Fired when the value of the widget is changed by the user.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the open event documentation.

Returns

\Kendo\UI\Signature

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->open('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onOpen(e) {
        // handle the open event.
    }
</script>
<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->open('onOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

popupScale

Defines a value indicating the scaling size of the popup signature pad

Returns

\Kendo\UI\Signature

Parameters

$value float

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->popupScale(1);
?>

readonly

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.

Returns

\Kendo\UI\Signature

Parameters

$value boolean

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->readonly(true);
?>

rounded

Sets a value controlling the border radius. Can also be set to the following string values: "small"; "medium"; "large" or "none".

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->rounded('value');
?>

size

Sets a value controlling size of the component. Can also be set to the following string values: "small"; "medium"; "large" or "none".

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->size('value');
?>

smooth

A value indicating whether to smoothen out the signature lines.

Returns

\Kendo\UI\Signature

Parameters

$value boolean

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->smooth(true);
?>

strokeWidth

Defines how wide will the stroke be.

Returns

\Kendo\UI\Signature

Parameters

$value float

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->strokeWidth(1);
?>

value

A string value representing a Base64-encoded PNG image

Returns

\Kendo\UI\Signature

Parameters

$value string

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->value('value');
?>

width

Determines the width of the signature in pixels.

Returns

\Kendo\UI\Signature

Parameters

$value float

Example

<?php
$signature = new \Kendo\UI\Signature('Signature');
$signature->width(1);
?>
In this article
Not finding the help you need?