This question has been flagged
3 Replies
3188 Views

Hello,


I've activated the "Allow use in Website Forms" option in the Time Off Model. 

I can now see the Time Off option in the Website's form builder and I can add the existing fields. However, when I Send/Submit I get the following error: "An error has occured, the form has not been sent."

Any help is appreciated, thanks.

Avatar
Discard
Best Answer

Where to find the   "Allow use in Website Forms" checkbox in odoo 16?

Avatar
Discard
Best Answer

Self hosted Odoo 16 - docker:
I can't add fields to the web form - the page goes to infinite rotating the progress indicator on pressing plus add button.
A have enabled  " allow to use in webform" at the hr.leave model and assigned Text for Label. Form block does not show any available fields .Also I do not understand how to assign what form input provides data for model fields

Avatar
Discard
Best Answer

Hi:

Did you specify values for "Label for form action" and "Field for custom form data" in the model. They're immediately after the "Allow use in Website forms" checkbox.

Also, which fields did you select and add to the form ?

Avatar
Discard
Author

Hello Paresh,

I did not specify any values for "Label for form action" what would I need to enter in this case?

Also, I've tried adding fields for the "Field for custom form data" but they fields don't seem to show up in the Website form builder.

I've tried a few different field combinations, but currently I have:

- Request Start Date

- Request End Date

- Description

Hi:

You can use any string for the "Label for form action". It will be displayed as one of the selections for "action" in the Form Builder when you start building a new form.

The "Field for custom form data" usually provides a list of a couple of existing fields in the model that can be used to store the raw data that was submitted from the form. The raw data that was submitted from the website form will be stored in the field you select here (in addition to the individual field values).

When you add the fields to the form, make sure that all the mandatory fields in the model are included in the form so that the submit does not error out.