You are not logged in.
So I have interger, text boxes, and all the other things working except dropdowns.
$GO_FIELDS['plugin_genericobject_tech_id']['name']= 'Who Has I';
$GO_FIELDS['plugin_genericobject_tech_id']['field']='tech';
$GO_FIELDS['plugin_genericobject_tech_id']['input_type']='dropdown';
$GO_FIELDS['plugin_genericobject_tech_id']['dropdown_type'] = 'global';
It creates the drop down and it has the + sign next to it but when I click it to add things to the drop down it doesn't work in debug mode I get this:
PHP Notice: Undefined index: id in /glpi/inc/commondbtm.class.php at line 1695
PHP Notice: Undefined index: comment in /glpi/inc/commondropdown.class.php at line 184
I know I'm getting something wrong. I have this in the field.constant.php file
I have a few dropdowns to add to this.
The Wiki was no help to me
I'm running glpi 80.70 and generic object 2.0.2
Offline
hi
try to remplace plugin_genericobject_tech_id by plugin_genericobject_techs_id
Offline
This is what happens when I try to add something to it. I tried changing the techs thing ty wawa but it didn't work
usually there's an add button but i'm getting nothing.
Offline
This is a bit closer look
Offline
there's something wrong in the code somewhere
I've opened a new ticket https://forge.indepnet.net/issues/3400
I'll try to fix it soon
Offline
hello
In the object field setup we have
Label Name in DB
Creation date expirationdate
Expiration date creationdate
And we would like to have notifications in case of object expiring
Thanks
//EDIT
if i change this file "field.constant.php"
trading the 30 with the 31 and vice versa, it looks correct, but i will leave it since i don't know the implications it might have..
$GO_FIELDS['creationdate']['name'] = $LANG['genericobject']['fields'][31];
$GO_FIELDS['creationdate']['input_type'] = 'date';
$GO_FIELDS['expirationdate']['name'] = $LANG['genericobject']['fields'][30];
$GO_FIELDS['expirationdate']['input_type'] = 'date';
Last edited by guilhas (2012-03-26 18:19:23)
Offline
Okay so i figured out the problem
$GO_FIELDS['plugin_genericobject_tech_id']['name']= 'Who Has It';
$GO_FIELDS['plugin_genericobject_tech_id']['field']='tech';
should be
$GO_FIELDS['plugin_genericobject_techtypes_id']['name']= 'Who Has It';
$GO_FIELDS['plugin_genericobject_techtypes_id']['field']='tech';
It needed "types" need to be added to the type.
I do have a question is there a way to get rid of names and comments. I don't needthose fields or could i even rename them?
Offline
hello
In the object field setup we have
Label Name in DB
Creation date expirationdate
Expiration date creationdateAnd we would like to have notifications in case of object expiring
Thanks
//EDIT
if i change this file "field.constant.php"trading the 30 with the 31 and vice versa, it looks correct, but i will leave it since i don't know the implications it might have..
$GO_FIELDS['creationdate']['name'] = $LANG['genericobject']['fields'][31];
$GO_FIELDS['creationdate']['input_type'] = 'date';$GO_FIELDS['expirationdate']['name'] = $LANG['genericobject']['fields'][30];
$GO_FIELDS['expirationdate']['input_type'] = 'date';
Okay so from my experience you don't need $LANG... all you need after that equals sign is the name you want the field to be unless you're supporting multiple languages. so if you look at my code
$GO_FIELDS['plugin_genericobject_techtypes_id']['name']= 'Who Has It';
$GO_FIELDS['plugin_genericobject_techstypes_id']['input_type']='dropdown';
the 'who has it ' is all you need.
Offline
By the way I meant this not the one with field I was removing that and pasted the wrong line. my bad
$GO_FIELDS['plugin_genericobject_techtypes_id']['name']= 'Who Has It';
$GO_FIELDS['plugin_genericobject_techstypes_id']['input_type']='dropdown';
Offline