|
dolibarr 25.0.0-alpha
|
Read or update fields of an object from the user interface (ajax edition of cards, kanban views...). More...
Go to the source code of this file.
Functions | |
| if(! $result) | objectFieldGetOutput ($object, $fieldname) |
| Return the value of a field of an object and its output html. | |
Read or update fields of an object from the user interface (ajax edition of cards, kanban views...).
GET with parameter fields (list of fields separated by a comma) returns the values of the fields allowed by CommonObject\isFieldReadableFromUi(), to refresh the values displayed by a page. With fields empty, it returns only the date of modification. With parameter input=1, it also returns the input html of the fields editable from the user interface (CommonObject\ajaxInputField()), to open the edition of a field on the card. POST with parameter field and the inputs of this field (named ajaxfield_<field>..., read by CommonObject\getFieldValueFromAjaxPost()) updates one field allowed by CommonObject\isFieldEditableFromUi() (attribute "uieditable"). The value is saved with CommonObject\updateFieldFromUi(), so triggers are called. Answer is a JsonResponse, data contains the values and their output html (CommonObject\ajaxOutputField()). After an update, it also contains the other fields changed by the update (computed fields, triggers...). A line of an object (ex: a line of evaluation) is checked with the permissions of its parent object.
Definition in file objectfield.php.
| if(! $result) objectFieldGetOutput | ( | $object, | |
| $fieldname ) |
Return the value of a field of an object and its output html.
| CommonObject | $object | Object |
| string | $fieldname | Field name |
Definition at line 122 of file objectfield.php.
References $object.