You are not logged in.
Using GLPI 0.90.1 with the Generic Objects Management plugin I can create a new object and define a dropdown field. However, when I wish to add items to the dropdown list the form does not include a "Save" button and if I hit enter to try to save the entry that way I get "The action you have requested is not allowed."
A sample field definition in .../files/_plugins/genericobject/fields/newtype.constant.php for new object "Newtype" is:
<?php
global $GO_FIELDS, $LANG;
$GO_FIELDS['plugin_genericobject_newfield_id']['name'] = 'Drop Down Field';
$GO_FIELDS['plugin_genericobject_newfield_id']['field'] = 'ddfield';
$GO_FIELDS['plugin_genericobject_newfield_id']['input_type'] = 'dropdown';
?>
Note that using a built in field such as "Model" does work.
Evidently I've missed something, but can't figure out what.
Last edited by mghesquiere (2016-03-02 02:11:08)
Offline
After digging around I found out that if you add the word "type" and pluralize the field portion of the index for the "name" and "input_type" entries it works. So the example changes to:
<?php global
$GO_FIELDS, $LANG;
$GO_FIELDS['plugin_genericobject_newfieldtypes_id']['name'] = 'Drop Down Field';
$GO_FIELDS['plugin_genericobject_newfield_id']['field'] = 'ddfield';
$GO_FIELDS['plugin_genericobject_newfieldtypes_id']['input_type'] = 'dropdown';
?>
Offline
After digging around I found out that if you add the word "type" and pluralize the field portion of the index for the "name" and "input_type" entries it works. So the example changes to:
<?php global $GO_FIELDS, $LANG; $GO_FIELDS['plugin_genericobject_newfieldtypes_id']['name'] = 'Drop Down Field'; $GO_FIELDS['plugin_genericobject_newfield_id']['field'] = 'ddfield'; $GO_FIELDS['plugin_genericobject_newfieldtypes_id']['input_type'] = 'dropdown'; ?>
Thank you! This saved me a couple of hours
Offline