Last Updated: 23 Nov 2018 12:48 by ADMIN
Created on: 16 May 2018 14:37
Category: PdfProcessing
Type: Feature Request
PdfProcessing: Provide a way to rename FormFields
Provide a way to change the Name of a FormField from the RadDocument.AcroForm.FormFields collection.

As a workaround, you could create a new instance of a FormField with the desired name, add the new field in the document and remove the old one. You can use the following approach:
   1) Create a new instance of FormField (with the desired name, passed in the constructor), which will play the role of a copy of a specific FormField
   2) Copy all properties from the original field (they all vary, depending on the concrete type of the FormField, for example CheckBoxField, etc.)
   3) Create a new widget for the new field, and copy all properties from the original field's widget into the new one.
   4) Remove the original field from the RadDocument.AcroForm.FormFields collection and add the new field.
   5) Remove the original widget from the corresponding page's annotation and add the new one.

Attached is a project demonstrating this approach for a CheckBoxField.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
Posted on: 23 Nov 2018 12:48

Attached is a project demonstrating the workaround for a RadioButtonField. 

I hope that this suits your needs.

Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Posted on: 15 Nov 2018 21:28
Has anyone done this for a Radio Button? I think you have several widgets for the radio button and only one form field? Whereas TextBox, ListBox, Checkbox are one-to-one widget to form field?