Good day!
When working with the PDF Viewer, there are some inconveniences we have found regarding related Checkboxes.
Using the provided sample PDF, the following exercise can be performed:
- Load the PDF using the Load method on the Controller.
- Select "Option C" from the Checkboxes (Input2).
- Save the Form using ExportFormFields method in Controller.
The extracted JSON would be as expected: "{"Input1":"Off","Input2":"3","Input3":"-","Input4":"-"}" - Reload the PDF Viewer, load the Form again (as to simulate a new session interaction with the document) and retrieve the saved Form using ImportFormFields method in Controller.
- The selected checkbox won't show up as selected to the User.
Is it possible to use multiple checkboxes with different values within SyncFusion?
We use
checkboxes instead of radio buttons for this scenario because once one of the radio buttons in
the group has been selected (such as with Input1), there’s no way of unselecting all the radio buttons
in the group. For example, if there’s a radio button for Male and another one
for Female, and the user has clicked on one of the radio buttons, the user
cannot have both unselected any longer, one button will always remain selected.
This represents a problem in self-administered questionnaires.
To go around
this issue with the radio buttons, we have traditionally used checkboxes (which
are joined into a single response set by naming them with the same variable
name or group name in PDF forms. When added manually with Adobe Acrobat, after
assigning a repeated variable name Acrobat adds '#[n]' at the end of each
variable name. Whenever the user marks one of the checkboxes, all other
checkboxes in the set automatically are unselected. When saved, the value
stored is that of the selected checkbox. And the added benefit, if the user wants to remove a selection from this group, they can simply select the already ticked checkbox to remove the tick mark. This will send the value "Off", indicating that the User didn't perform any selections for that group.
Can you suggest
how we can make SyncFusion show up and correctly preserve the value in this type of field?
Attachment:
TestInputs_7d205fa6.zip