Hello,
I've got a few questions about the PDF Form Designer in the PDF Viewer (ASP.NET CORE & JAVASCRIPT).
I'd like to externalize the "Add & Edit Form Fields" toolbar from the PDF VIEWER, I'm already able to drag'n'drop a new form field using a button on my web page using these javascript lines:
var pdfViewer = document.getElementById('container').ej2_instances[0];
pdfViewer.formDesignerModule.setFormFieldMode("Textbox");
But, I'm unable to edit the newly added fields from the UI without opening the "Add & Edit Form Fields" toolbar to change sizes and properties.
I would like to let the user edit the programmatically added fields from the UI without opening this toolbar.
How can I achieve this?
You'll find in the attachment a GIF showing a draft of what I tried to achieve.
My second question is about the form fields properties. By default, right-clicking a form field allow to edit his general and appearance properties.
I also need to externalize this properties editor from the PDF Viewer elsewhere in my page, can I re-use your properties panel or do I need to make it by myself, by updating the form field properties?
Regards,
Nicolas
Please find the details.
|
I would like to let the user edit the programmatically added fields from the UI without opening this toolbar. How can I achieve this?
|
To edit the form fields without open the form designer toolbar, you can utilize the `designerMode` API. This API allows you to achieve this functionality, and we've included the corresponding code snippet below.
Code snippet:
|
|
|
I would like to let the user edit the programmatically added fields from the UI without opening this toolbar. How can I achieve this?
|
To edit the form
field programmatically, you can use the `updateFormField` method. This method
enables you to programmatically change the form field properties . Below,
you'll find the code snippet for implementing this.
|
We've also provided a sample and a video recording demonstrating this process. In the provided video, we have modified the form field properties at form field index 0.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/FormFieldEdit181953893.zip
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/FormFieldVideo383797724.zip
Hi,
Thanks for your reply and sample, everything's working as I expected!
Have a nice day.
Nicolas
We are glad to know that the reported query was resolved on your end. So, we are closing this ticket.