-
Notifications
You must be signed in to change notification settings - Fork 0
How to create fields
IuliaFlorinaDuma edited this page Sep 6, 2021
·
2 revisions
This is the order of the parameters:
public function createField($viewId, $object, $type, $typeReference, $name, $label, $required, $actionExecution, $options, $method = '', $group = '', $actionResponse = '', $searchable = false, $scope = 'user', $preloadPath = '', $readonly = false, $info = '')
{ }
`$typeV = 'View';`
`$viewId = $mObj->createAndAdd($typeW, (string) $workspaceId, $typeV, $data);`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_FORM, "", "Adauga Material", "", true, "", '{"maxWidth":600, "maxHeight":370}');`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_TEXT, "", "articol", "Articol^style='width: 300px; height: 26px'", true, "", "");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_TEXT, "", "longname", "Nume material^style='width: 300px; height: 26px'", true, "", "");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_ENUM, ".Workspace", "importuom", "Unitate de masură^style='width: 300px; height: 26px'", false, "", "getUom", "name");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_TEXT, "", "cosuppliercode", "Codul furnizorului^style='width: 300px; height: 26px'", true, "", "");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_TEXT, "", "contreprez", "Cont reprez.^style='width: 300px; height: 26px'", false, "", "");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_TEXT, "", "gestimpl", "Gest impl.^style='width: 300px; height: 26px'", false, "", "");`
`$workspaceD->createField($viewId, "Pmamaterial", \Application\Document\Field::TYPE_BUTTON, "", "save", "Salveaza", false, "saveObject", "");`
- In this example I was creating a form
- We must select the desired reference from the list of references and you must complete the desired parameters.
-
Types of references:
- const TYPE_FORM = 'form';
-
const TYPE_REFERENCE_REMOTE = 'ref-by-ref-remote'; -
const TYPE_REFERENCE = 'ref-by-ref'; -
const TYPE_REF_VALUE = 'ref-by-value'; -
const TYPE_REF_VALUE_REMOTE = 'ref-by-value-remote'; -
const TYPE_QRCODES = 'qrcodes'; -
const TYPE_QRCODE = 'qrcode'; -
const TYPE_BARCODE = 'barcode'; -
const TYPE_IMAGE = 'image'; -
const TYPE_IMAGES = 'images'; -
const TYPE_PDF = 'pdf'; -
const TYPE_RADIO = 'radio'; -
const TYPE_TEXT = 'text'; -
const TYPE_FILE = 'file'; -
const TYPE_GRID = 'grid'; -
const TYPE_BUTTON = 'button'; -
const TYPE_DATE = 'date'; -
const TYPE_TIME = 'time'; -
const TYPE_DATETIME = 'datetime'; -
const TYPE_LIST = 'list'; -
const TYPE_CHECKBOX = 'checkbox'; -
const TYPE_ENUM = 'enum'; -
const TYPE_COLOR = 'color'; -
const TYPE_TEXTAREA = 'textarea'; -
const TYPE_EDITOR = 'editor'; -
const TYPE_SIGNATURE = 'signature'; -
const TYPE_LABEL = 'label';
tes