Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Signature Field

All examples are included with download of MBS FileMaker Plugin.

Signature Field.fmp12

Overview
Tables 1
Relationships 0
Layouts 2
Scripts 1
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Visionär
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password Off
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Signature Field
2 fields defined, 1 record
Signature Field

Fields

Table Name: Signature Field - 2 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
html Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        Data Normal, Binary Auto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1

            Layout Objects: Signature Field

            Regular Fields

            Field Name: Signature Field::Data
            Field Properties Coordinates Field Format Field Behavior Quick Find
            • Top: 62 pt
            • Left: 590 pt
            • Bottom: 279 pt
            • Right: 1101 pt
            • Anchoring: Left, Top
            Field Format:
            • Edit Box
            Field Behavior:
            • Allow field to be entered: In Find mode, In Browse mode
            • Touch keyboard type: Default for Data Type
            • Go to next field using: Tab key
            No

            Buttons

            Button Properties Coordinates Script/Script Step
              Type:
            • Text: Save To Container
              Additional Properties:
            • Change to hand cursor over button
            • Top: 290 pt
            • Left: 590 pt
            • Bottom: 312 pt
            • Right: 733 pt
            • Anchoring: Left, Top
            Perform Script [ “Save To Field” ]

            Scripts:


            Button Properties Coordinates Script/Script Step
              Type:
            • Text: Clear Container
              Additional Properties:
            • Change to hand cursor over button
            • Top: 290 pt
            • Left: 749 pt
            • Bottom: 312 pt
            • Right: 892 pt
            • Anchoring: Left, Top
            Set Field [ Signature Field::Data; "" ]

            Fields:


            Button Properties Coordinates Script/Script Step
              Type:
            • Text: Clear
            • Top: 290 pt
            • Left: 431 pt
            • Bottom: 312 pt
            • Right: 524 pt
            • Anchoring: Left, Top
            Set Web Viewer [ Object Name: "web"; Action: Reload ]

            Web Viewer Controls

            Web Viewer Control Properties Coordinates Web Address
              Object Name:
            • web
              Additional Properties:
            • Allow interaction with web viewer content
            • Top: 62 pt
            • Left: 13 pt
            • Bottom: 279 pt
            • Right: 524 pt
            • Anchoring: Left, Top
            Let ( [ b = 511 ; h = 217 ] ; Substitute ( "data:text/html," & Signature Field::html ; [ "@@SignatureWidth@@" ; b & "px" ] ; [ "@@SignatureHeight@@" ; h & "px" ] ) )

            Layout Objects: HTML

            Regular Fields

            Field Name: Signature Field::html
            Field Properties Coordinates Field Format Field Behavior Quick Find
            • Top: 57 pt
            • Left: 7 pt
            • Bottom: 525 pt
            • Right: 1016 pt
            • Anchoring: Left and Right, Top and Bottom
            Field Format:
            • Edit Box
            Field Behavior:
            • Allow field to be entered: In Find mode, In Browse mode
            • Touch keyboard type: Default for Data Type
            • Go to next field using: Tab key
            Yes

            Script Hierarchy

            Save To Field

            Script Name Save To Field
            Run script with full access privileges Off
            Siri Shortcut Visible Off
            Include In Menu No
            Layouts that use this script
            Scripts that use this script
              Script Definition
              Script Steps
              • Set Variable [ $r; Value:MBS( "WebView.RunJavaScript" ; "web"; "formtest.output.value = document.getElementsByTagName('canvas')[0].toDataURL('image/png');" ) ]
              • Set Variable [ $dataURL; Value:MBS( "WebView.GetFormTextAreaValue" ; "web"; "formtest"; "output"; 0 ) ]
              • Set Variable [ $p; Value:Position($DataURL; ","; 1; 1) ]
              • If [ $p > 0 ]
              • Set Variable [ $data; Value:Middle($dataURL; $p + 1; Length($dataURL)) ]
              • Set Field [ Signature Field::Data; Base64Decode ( $data; "signature.png" ) ]
              • End If
              Fields used in this script
              Scripts used in this script
                Layouts used in this script
                  Tables used in this script
                  Table occurrences used by this script
                  Custom Functions used by this script
                    Custom menu set used by this script

                      Download example: Signature Field

                      Used functions: