# Form submit problem

**URL:** <https://www.dolibarr.org/forum/t/form-submit-problem/21062>\
**Category:** Developing for Dolibarr\
**Created:** [August 16, 2021, 4:55pm UTC](https://www.dolibarr.org/forum/t/form-submit-problem/21062 "2021-08-16T16:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milenmk](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/milenmk/32/4128_2.png) [@milenmk](https://www.dolibarr.org/forum/u/milenmk)\
**Post date:** [August 16, 2021, 4:55pm UTC](https://www.dolibarr.org/forum/t/form-submit-problem/21062/1 "2021-08-16T16:55:45Z")

</div>

Hello.

I am developing a custom module and want to add an additional field on Expense report creation.

1. I have created my module
2. I have created the hook
3. I have set an SQL file, so a column named fk\_soc is added in llx\_expensereport (fk\_soc int(11))
4. The required field (DropDown to select Third party) is shown on the Expense report create page
5. On form submit, field ‘fk\_soc’ is not populated

My code:

On “expensereport/card.php” I have

```auto
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);

```

so in my class, I have this function:

```auto
    public function formObjectOptions($parameters, &$object, &$action, $hookmanager)
    {
        global $conf, $user, $langs;
        $error = 0; // Error counter

        if ($action === 'create') {
            print '<tr><td class="tdtop">' . $langs->trans('Customer') . '</td>';
            print '<td>';

            $form = new Form($this->db);
            $societe = new Societe($this->db);

            print img_picto('', 'company') . $form->select_company($societe->id, 'fk_soc', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx');
            print '</td>';
            print '</tr>';
        }

        if (!$error) {
            return 0;
        } else {
            dol_print_error($this->db);
            return -1;
        }
    }

```

I am attaching the form create screen.

 ![Screenshot_1](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/0239c496a208daaf2302f0fdfa9173cdf0786dfe.png)
