This topic contains 10 replies, has 2 voices, and was last updated by  Duo_Liang 2 weeks, 1 day ago.

  • Author
    Posts
  • Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    I am able to create the checkbox using the examples on the site but is there a way to set a checkbox to checked by default?

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469

    Score

    0

    Hi Ryan,

    To set a checkbox checked by default, you can set value “X”/”x”/”true” (“X” is the most recommanded) for this field in your json, here’s some sample json:

    "fields": [
            {
                "binding": null,
                "validation": {
                    "required": false,
                    "maxLength": null,
                    "minLength": null,
                    "enum": null,
                    "errorMessage": "",
                    "errorCode": null,
                    "pattern": ""
                },
                "id": "F9p2IlVxNMMI",
                "data": null,
                "subtype": "CHECKBOX",
                "top": 97,
                "page": 0,
                "extract": false,
                "width": 26,
                "height": 26,
                "left": 436,
                "extractAnchor": null,
                "type": "INPUT",
                "value": "X",
                "name": ""
            }
    ]

    Hope this could help you!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    Score

    0

    Duo,

    That worked, thank you! I tried “checked” and “true” in the value field but I never thought to try “X”.

    Anyways, pleas see the attached img. Is this default behavior? The checkbox is actually above where it supposed to be, when signing.

    Attachments:
    You must be logged in to view attached files.
    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469

    Score

    0

    Hi Ryan,

    Did you any extraction methods on your document? Can you share more info about how you create this field?

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 2 weeks, 3 days ago by  Duo_Liang.
    Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    Score

    0

    Duo,

    I am creating this field at the same time as the other fields on the page. I’m building my approvals and this is an example that is created and sent up.

                {
                  "binding": null,
                  "page": 0,
                  "top": 458.9000000000002,
                  "subtype": "CHECKBOX",
                  "height": 29.0,
                  "left": 91.0,
                  "width": 10.3974609375,
                  "type": "INPUT",
                  "value": "true"
                },
    
    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469

    Score

    0

    Hi Ryan,

    Sorry for the confusion of last reply, if you are setting your checkbox field to a rectangle, before signature is confirmed, it showed up in a small square. But after confirmation, it will fill the whole box.
    If it’s an inconvenience to you, you can post here and I will report to PM team and have them investigate this.

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 2 weeks, 3 days ago by  Duo_Liang.
    • This reply was modified 2 weeks, 3 days ago by  Duo_Liang.
    Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    Score

    0

    Duo,

    Is there another way of doing this? Is this not the recommended way and is there an example of another way?

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469
    Approved answer

    Score

    0

    Hi Ryan,

    Is there a special reason that you set your checkbox field in a rectangle instead of a square (keep width&height same) like below? Because I saw you had a square shape checkbox background layer on your pdf.

    {
                  "binding": null,
                  "page": 0,
                  "top": 458.9000000000002,
                  "subtype": "CHECKBOX",
                  "height": 10.3974609375,
                  "left": 91.0,
                  "width": 10.3974609375,
                  "type": "INPUT",
                  "value": "true"
                }

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 2 weeks, 3 days ago by  Duo_Liang.
    Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    Score

    0

    Duo,

    We are using white text to get coordinates of where we want to place the checkbox. The same kind of logic that we use for our signing fields or labels, etc.

    Participant
    Ryan_Coleman
    Regular Member
    Member since: 16.07.2018
    Number of posts: 61

    Score

    0

    Duo,

    After setting it to a square I am now pleased to say that this solved the issue. The checkbox is right where it needs to be.

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469

    Score

    0

    Hi Ryan,

    Glad to hear that you solved your issue and thanks for sharing this way of getting coordinates with us!

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 2 weeks, 1 day ago by  Duo_Liang.

You must be logged in to reply to this topic.