# Make form fields movable just like other annotations

**URL:** <https://pdfjs.community/t/make-form-fields-movable-just-like-other-annotations/2067>\
**Category:** Technical Support\
**Created:** [September 28, 2022, 12:07pm UTC](https://pdfjs.community/t/make-form-fields-movable-just-like-other-annotations/2067 "2022-09-28T12:07:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anurag.kurmi](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@anurag.kurmi](https://pdfjs.community/u/anurag.kurmi)\
**Post date:** [September 28, 2022, 12:07pm UTC](https://pdfjs.community/t/make-form-fields-movable-just-like-other-annotations/2067/1 "2022-09-28T12:07:11Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
8.7.0

**Detailed description of issue**  
When a form field is added programmatically it is not getting selected by default just like other annotations for ex. Free Text have the bounds to rotate,move and enlarge etc.

**Expected behaviour**  
Need to have a similar bound like this but around the newly added text field programmatically.  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/1/13b3eb22c4e66b0fbc2512bffbde4d7ae242c8c7.png)

**Does your issue happen with every document, or just one?**  
Its not working with all documents having form fields added programmatically.

**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
`const flags = new WidgetFlags(); flags.set('Multiline', false); flags.set('Required', true); // create a form field const field = new Annotations.Forms.Field('coachName', { type: 'Tx', flags, }); field.setValue('Coach name'); // create a widget annotation const widgetAnnot = new Annotations.TextWidgetAnnotation(field); // set position and size widgetAnnot.PageNumber = currentPageNumber; widgetAnnot.X = pageCoordinates.x; widgetAnnot.Y = pageCoordinates.y; widgetAnnot.Width = 100; widgetAnnot.Height = 20; // add the form field and widget annotation annotManager.getFieldManager().addField(field); annotManager.addAnnotation(widgetAnnot); annotManager.drawAnnotationsFromList([widgetAnnot]);`

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [September 28, 2022, 12:07pm UTC](https://pdfjs.community/t/make-form-fields-movable-just-like-other-annotations/2067/3 "2022-09-28T12:07:17Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Add Link to Annotations - Programmatically Add Intra-Document Link to Existing Annotation](https://pdfjs.express/documentation/annotation/add-link-to-annotation.8#programmatically-add-intra-document-link-to-existing-annotation)
- [Create highlight annotations in PDF.js Express - Other examples](https://pdfjs.express/documentation/annotation/create-annotation-highlight#other-examples)
- [Create rectangle annotations in PDF.js Express - Other examples](https://pdfjs.express/documentation/annotation/create-annotation-rectangle#other-examples)

APIs:
- [Core.Annotations.FreeTextAnnotation - new FreeTextAnnotation( [intent] [, initializer])](https://pdfjs.express/api/Core.Annotations.FreeTextAnnotation.html#FreeTextAnnotation__anchor)
- [Core.Tools.TextFormFieldCreateTool](https://pdfjs.express/api/Core.Tools.TextFormFieldCreateTool.html#__anchor)
- [Core.Annotations.TextUnderlineAnnotation - new TextUnderlineAnnotation( [initializer])](https://pdfjs.express/api/Core.Annotations.TextUnderlineAnnotation.html#TextUnderlineAnnotation__anchor)

Forums:
- [Confirm output of trial form field merger](https://pdfjs.community/t/confirm-output-of-trial-form-field-merger/744/1)
- [How to create custom annotation comment with id?](https://pdfjs.community/t/how-to-create-custom-annotation-comment-with-id/1240/1)
- [Increase lable width/space](https://pdfjs.community/t/increase-lable-width-space/1639/1)

  
  

Share how you are using PDF.js Express in your organization you could win a **$500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free**. Learn more [here](https://utm.guru/ueQNw)

---

<div class="post-metadata">

**Author:** ![zserviss](https://avatars.discourse-cdn.com/v4/letter/z/a9a28c/32.png) [@zserviss](https://pdfjs.community/u/zserviss)\
**Post date:** [September 28, 2022, 5:20pm UTC](https://pdfjs.community/t/make-form-fields-movable-just-like-other-annotations/2067/4 "2022-09-28T17:20:16Z")

</div>

Hi Anurag,

Unfortunately, form fields are not moveable annotations. I would recommend using a fixed size FreeText annotation.

Best Regards,  
Zach Serviss  
Web Development Support Engineer  
PDFTron Systems, Inc.

Share how you are using PDF.js Express in your organization you could win a **$500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free**. Learn more [here](https://utm.guru/ueQNw)
