FIG some fields available attributes. Most get the value from the model definition, but may be covered in the view. The following fields are available to quickly view the property:
- name identifies the name of the database field
- string for the label text you want to overwrite the model label text
- help is hovering over the field displays the prompt text, it allows us to help cover model text provided in the definition
- placeholder is the prompt text to display in the field
- widget so that we can override the default component field, and for a while we talked about will be available components
- JSON options data structure is a component with additional data, with different values of different components of each support
- class field is used to render HTML CSS class
- nolabel = "True" to stop the automatic display field labels. Only <group> elements have a role in the field, typically < "..." label for => used with the elements.
- invisible = "True" so that the field is not visible, but still get the data from the server and can be used in a form
- readonly = "True" so that the field is not editable form
- required = "True" to make the form fields are required
Some properties of a specific field are as follows:
- password = "True" for the text field. Display the password entry, hidden text input
- Name of the model field filename for the binary field, which is used to store the uploaded file name
Field Label
<Label> element may be used to gain more control over the field label. A use example is only to show the label when the form is in edit mode:
<label for="name" class="oe_edit_only" />
In so doing, if the field inside the <group> element, we usually have to set their nolabel = "True". class = "oe_edit_only" can be used to apply CSS styles, so the label is visible only in Edit mode.