How to get inserted FormField name.

Hi Syncfusion Team,

we are using Document Editor Control.

In that when I insert FormField by this method

--> this.editorObj.documentEditor.editor.insertFormField('Text');

it doesn't return the name of that field which I need to use "Text1" as parameter.  

--> this.editorObj.documentEditor.getFormFieldInfo('Text1') as TextFormFieldInfo;

And this is definitely not good practice because if Text1 is present already then we have to fetch FormFieldInfo with Text2 name(parameter).


here is what I am doing,

Screenshot 2024-05-07 at 9.32.38 AM.png

so is there any method so I can get inserted field info on the insertion of FormField?

And one more question can I get "this.editorObj.documentEditor.getFormFieldNames()" by page number.


5 Replies 1 reply marked as answer

KM Kavitha Muralitharan Syncfusion Team May 7, 2024 01:36 PM UTC

Hi Yogesh,


Currently, we are checking this scenario and will update details by May 9, 2024.


Regards,

Kavitha M



YO Yogesh replied to Kavitha Muralitharan May 14, 2024 10:05 AM UTC

Hello Kavitha Muralitharan,

Is there any update?

 



RT Ragu Thanigasalam Syncfusion Team May 16, 2024 07:05 AM UTC

Hi Yogesh,

We are currently working on retrieving the page number based on your selection. we will update the details by May 16, 2024.



YO Yogesh replied to Ragu Thanigasalam May 16, 2024 07:26 AM UTC

hello Ragu Thanigasalam,

Is there any update on How to get inserted FormField name property,this.editorObj.documentEditor.editor.insertFormField('Text');



RT Ragu Thanigasalam Syncfusion Team May 16, 2024 06:01 PM UTC

Hi Yogesh,

How to get inserted FormField name

Please refer to the UG documentation.

https://ej2.syncfusion.com/angular/documentation/document-editor/form-fields#export-form-field-data

get "this.editorObj.documentEditor.getFormFieldNames()" by page number.

When we insert form field, bookmark is added to the inserted form field and we have Api to select a bookmark based on the  bookmark name, also we have property to get page number.

Code snippet:

container.documentEditor.selection.selectBookmark('Text2');

container.documentEditor.selection.startPage

 

sample - 1jqn3s (forked) - StackBlitz


Regards,

Ragu T.


Marked as answer
Loader.
Up arrow icon