(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
signature
 
signature
 
===Type===
 
===Type===
_input
+
input
 
===Synopsis===
 
===Synopsis===
 
How to render a signature field
 
How to render a signature field
Line 12: Line 12:
  
 
<nowiki>*</nowiki> = means required
 
<nowiki>*</nowiki> = means required
 +
 +
'''name'''*
 +
 +
''type : text''
 +
 +
As with any input field, a name is mandatory
  
 
'''fname'''*
 
'''fname'''*
Line 30: Line 36:
  
 
The (text-) content that goes on the page when saving to the wiki
 
The (text-) content that goes on the page when saving to the wiki
 +
 +
'''parsecontent'''
 +
 +
''type : text''
 +
 +
''value : parsecontent''
 +
 +
Will force FlexForm to insert values from other form fields inside the pagecontent field. Use square brackets, like [fieldname], where values should be inserted.
 +
 +
'''template '''
 +
 +
''type : text''
 +
 +
If you want to store a template call inside the content of the File page, you can template=<name of your template> in combination with parsecontent. [flexform-template] inside your content field will be replaced by {{<name of your template and [/flexform-template] will be replaced by }}. See example 3 on the file/input examples page.
  
 
'''class'''
 
'''class'''
Line 112: Line 132:
 
===Example===
 
===Example===
 
<syntaxhighlight lang="html">
 
<syntaxhighlight lang="html">
<_input type="signature" fname="Signature-test" ftype="png" pagecontent="test" guideline="true" clearbuttonclass="btn btn-primary" />
+
<input type="signature" name="signature" fname="Signature-test" ftype="png" pagecontent="test" guideline="true" clearbuttonclass="btn btn-primary" />
 
</syntaxhighlight>
 
</syntaxhighlight>
<_input type="signature" fname="Signature-test" ftype="png" pagecontent="test" guideline="true" clearbuttonclass="btn btn-primary" />
+
<input type="signature" name="signature" fname="Signature-test" ftype="png" pagecontent="test" guideline="true" clearbuttonclass="btn btn-primary" />
 +
 
 +
''Note that anonymous users may not see the signature field.''
 +
 
 
===Note===
 
===Note===
 
''Only one signature field per form is supported!''
 
''Only one signature field per form is supported!''
 
===Links===
 
===Links===
ws-class-props
Line 1: Line 1:
 
{{Doc properties
 
{{Doc properties
|Subject version=2.0
+
|Subject version=2.0,2.1
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input

Latest revision as of 14:55, 8 December 2023

Name

signature

Type

input

Synopsis

How to render a signature field

Description

A signature field allows person to add a signature to a form.

Parameters

type="signature"


* = means required

name*

type : text

As with any input field, a name is mandatory

fname*

type : text

Name of the file to be placed in the Wiki

ftype*

type : text

Filetype. Either png, svg or jpg

pagecontent*

type : text

The (text-) content that goes on the page when saving to the wiki

parsecontent

type : text

value : parsecontent

Will force FlexForm to insert values from other form fields inside the pagecontent field. Use square brackets, like [fieldname], where values should be inserted.

template

type : text

If you want to store a template call inside the content of the File page, you can template=<name of your template> in combination with parsecontent. [flexform-template] inside your content field will be replaced by {{<name of your template and [/flexform-template] will be replaced by }}. See example 3 on the file/input examples page.

class

type : text

Adds an additional CSS class to the signature canvas.

By default the signature canvas will always get class: wsform-signature.

clearbuttonclass

type : text

Adds an additional CSS class to the clear button to clear the canvas.

By default the clear button will always get class: wsform-signature-clear.

clearbuttontext

type : text

Text to be placed in the clear button. Default to Clear.

background

type : color. Either hexadecimal, CSS color name or css rgb value

Background color for the signature field

drawcolor

type : color. Either hexadecimal, CSS color name or css rgb value

Color of the signature pen

thickness

type : integer

Thickness of the signature pen

notavailablemessage

type : text

When a browser does not support the signature canvas, this message will be displayed.

Default message : "Your browser doesn't support signing"

guideline

type : text

Show a horizontal line to guide when writing a signature.

Use guideline="true" is the only way to show the guideline.

Please note that the guideline will be saved together with the signature, unless you choose svg as file type.

Additional guideline option, available when guideline is set to true

- guidelineoffset

type: integer

Offset from the bottom of the canvas

- guidelineindent

type: integer

Margin left and right from the line to the side of the canvas

- guidelinecolor

type : color. Either hexadecimal, CSS color name or css rgb value

Color for the guideline

All other valid parameters for an input field are valid

Example

<input type="signature" name="signature" fname="Signature-test" ftype="png" pagecontent="test" guideline="true" clearbuttonclass="btn btn-primary" />

Note that anonymous users may not see the signature field.

Note

Only one signature field per form is supported!

Links