# Move custom created/hooked control button to internal object

**URL:** <https://www.dolibarr.org/forum/t/move-custom-created-hooked-control-button-to-internal-object/22830>\
**Category:** Developing for Dolibarr\
**Created:** [September 23, 2022, 1:36pm UTC](https://www.dolibarr.org/forum/t/move-custom-created-hooked-control-button-to-internal-object/22830 "2022-09-23T13:36:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zetascout](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/zetascout/32/5595_2.png) [@zetascout](https://www.dolibarr.org/forum/u/zetascout)\
**Post date:** [September 23, 2022, 1:36pm UTC](https://www.dolibarr.org/forum/t/move-custom-created-hooked-control-button-to-internal-object/22830/1 "2022-09-23T13:36:41Z")

</div>

Hello,

When using Dolibarr hooks is it possible to place your generated button (for example the “Get Identifier”) next to the field “Identifier” we created? If so, how would I do it since right now I am using the formObjectOptions hook and it executes before the other field generation.

 ![getid](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/0b7e7a7c2523909f7c2b7d890fc7580a1276a831.jpeg)  
Identifier is added by complimentary attributes.

```auto
public function formObjectOptions(&$parameters, &$object, &$action,$hookmanager){
        echo '<input type=button value="Get Identifier" onclick="Hello()">';
        return 0;
}

```

Please suggest most common way to add button to expected place from module source code, without modifying main source files. I have dumb idea use Jquery and move object on page load but I believe there are more common way.  
Thank you

---

<div class="post-metadata">

**Author:** ![mgribaudo](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mgribaudo/32/3096_2.png) [@mgribaudo](https://www.dolibarr.org/forum/u/mgribaudo)\
**Post date:** [September 26, 2022, 3:07pm UTC](https://www.dolibarr.org/forum/t/move-custom-created-hooked-control-button-to-internal-object/22830/2 "2022-09-26T15:07:38Z")

</div>

No, hooks create / replace pieces of code, so the button is created where the hook is called.  
I’ve never tried but I have an idea that working with css you can get the result you are looking for

---

<div class="post-metadata">

**Author:** ![zetascout](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/zetascout/32/5595_2.png) [@zetascout](https://www.dolibarr.org/forum/u/zetascout)\
**Post date:** [September 30, 2022, 4:52am UTC](https://www.dolibarr.org/forum/t/move-custom-created-hooked-control-button-to-internal-object/22830/3 "2022-09-30T04:52:19Z")

</div>

Thank you **mgribaudo**  
Solved problem using jquery to move objects.
