ck123 | Posts: 4

Injecting AcroForm Radio Buttons

0 votes

As posted in this thread it seems injecting radio buttons into a PDF is not supported -- is that still the case?

In AcroForms, radio button groups are defined as two or more radio button controls that have the same Name but different 'Choice' values -- see attached for my test PDF.

Radio Button Definition

This isn't possible to reference by the API, as two elements cannot have the same ID.

So either I am missing something obvious, or this is still not supported.

 

Thanks

 

 


Attachments
Duo_Liang | Posts: 3776

Reply to: Injecting AcroForm Radio Buttons

1 votes

Hi Charles,

 

Thanks for the posting and for the good question! If you are implementing an accessible PDF with radio buttons, its field name/ID has a specific naming convention:

{groupName}[{indexWithinGroup}]

So in your case, Yes will be represented as Radio-Signer1[0] and No will be Radio-Signer1[1]

            {
              "binding": null,
              "validation": {
                "enum": [
                  "group1"
                ],
                "required": false
              },
              "id": "Radio-Signer1[0]",
              "subtype": "RADIO",
              "extract": true,
              "type": "INPUT",
              "value": "",
              "name": "Radio-Signer1[0]"
            },
            {
              "binding": null,
              "validation": {
                "enum": [
                  "group1"
                ],
                "required": false
              },
              "id": "Radio-Signer1[1]",
              "subtype": "RADIO",
              "extract": true,
              "type": "INPUT",
              "value": "",
              "name": "Radio-Signer1[1]"
            }

However during my test, I tried to revert the order - make No the first within the group and Yes the second, but the mapping result is still the same: Yes -> Radio-Signer1[0], No->Radio-Signer1[1]. I did another test to make No left top and Yes right bottom, but still the same. So if you preferred, I can create a support ticket on your behalf asking for a clarification on it.

 

On top of the discussions towards radio buttons, below are some of my suggestions and thoughts regarding to creating an ADA PDF/package:
- I saw you haven't tagged the PDF, don't forget to tag it before uploaded to an accessible package. I was testing with the attached PDF which was auto-tagged out of yours.

- From the best of my knowledge, OneSpan Sign document engine doesn't support List and Dropdown List forms.

- I also attached the complete package JSON I used for testing, just for your reference.

 

Duo


Attachments
ck123 | Posts: 4

Reply to:

0 votes

Thanks Duo -- above and beyond, much appreciated. Especially for the example documents, made things much easier to understand.

The indexing did the trick for the radio buttons. I believe they are indexed by the order they were first created on the form -- most likely I created the button that would become 'Yes' first.

It does seem that Lists are working as expected with this config:

eSign List

{
                            "type":"INPUT",
                            "subtype":"LIST",
                            "name":"List-Signer1",
                            "id":"List-Signer1",
                            "value":"Option 2",
                            "validation": {
                                "required":true,
                                "enum": [
                                    "Option 1",
                                    "Option 2",
                                    "Option 3"
                                ]
                            }
                        },


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off