Skip to content

Commit

Permalink
Support v6 and also include attributes to avoid php warning
Browse files Browse the repository at this point in the history
  • Loading branch information
adamzammit committed May 30, 2023
1 parent 94448f7 commit c65e336
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Signature pad question type for LimeSurvey
A LimeSurvey question theme that uses the [signature_pad](https://github.com/szimek/signature_pad) js library (MIT Licence) to allow for the display of a signature pad as a variation of the LimeSurvey short-free-text type question, and to store the signature as PNG [Data URI](http://en.wikipedia.org/wiki/Data_URI_scheme)

First version is Compatible with LimeSurvey version 3.x
Compatible with LimeSurvey versions 3.x,4.x,5.x,6.x

## Installation and Usage

Expand Down
33 changes: 32 additions & 1 deletion signature/survey/questions/answer/shortfreetext/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@
<!-- Those metadata will be displayed in the template configuration page. They are not used for now. -->
<metadata>
<name>signature</name>
<type>question_theme</type>
<title>Signature Pad</title>
<creationDate>2023-05-29</creationDate>
<lastUpdate>2023-05-29</lastUpdate>
<author>Adam Zammit</author>
<authorUrl>https://www.acspri.org.au/</authorUrl>
<authorEmail>adam.zammit@acspri.org.au</authorEmail>
<authorUrl>https://www.acspri.org.au</authorUrl>
<copyright>Copyright (C) 2023 Australian Consortium for Social and Political Research Incorporated (ACSPRI)</copyright>
<license>GNU General Public License version 2 or later</license>
<version>1.0</version>
<apiVersion>1</apiVersion>
<lastSecurityUpdate>1.0</lastSecurityUpdate>
<questionType>S</questionType>
<group>Text questions</group>
<description>Collect a signature from the respondent and save as base64</description>
</metadata>

<compatibility>
<version>3.0</version>
<version>4.0</version>
<version>5.0</version>
<version>6.0</version>
</compatibility>

<!--
Here the list of the css/js files to load.
Any file here will be loaded via the asset manager (when in config.php debug = 0)
Expand All @@ -29,8 +42,26 @@
<js>
<filename>scripts/signature_pad.umd.min.js</filename>
</js>
<preview>
<filename>images/signature.png</filename>
</preview>
</files>

<attributes>
<!-- Hide some core attributes -->
<attribute>
<name>prefix</name>
<category>Display</category>
<inputtype/>
</attribute>
<attribute>
<name>display_rows</name>
<category>Display</category>
<inputtype/>
</attribute>
</attributes>


<!-- Here datas about how LimeSurvey should load the core js/css of the question -->
<engine>
<load_core_css>true</load_core_css>
Expand Down

0 comments on commit c65e336

Please sign in to comment.