Ability to answers from other questions in LDAP Filter field of LDAP Select question type
As an example, I would like to be able to select a User either from an LDAP Select field or a GLPI Object : Administration - Users field and then have another LDAP Select field use the value from the User field selection in its Filter field to limit selection/display of values to only that user. Would also be useful if a ##form_author## tag and ##form_validator## tag, so that we could reference the author or validator in an LDAP filter.
Lets say I have only two form fields, User Name and Account.
User Name is the first fields name and this is an LDAP Select field. It is a Required field and Show empty is set to No. Filter is set to (&(objectClass=user)(objectCategory=person)(memberof=CN=GLPIUsers,OU=Groups,DC=domain,DC=ad)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) and the Attribute field is set to be cn. This field will allow selection of the CN attribute values of active LDAP users that are members of the GLPIUsers LDAP group, it will default to the first non-empty value.
Account is the second fields name and this is also an LDAP Select field. It is also a Required field and Show empty is also set to No, the Attribute filed is set to be samAccountName. I would like to be able to set the Filter field to (&(objectClass=user)(objectCategory=person)(distinguishedName=CN=##answer_5##OU=Users,DC=domain,DC=ad)) and have the ##answer_5## tag replaced with the selected CN value from the User Name field, prior to performing the LDAP search. The LDAP search would need to refresh each time the referenced field was updated.
If this were to function correctly, the Account field would show the samAccountName attribute for the LDAP user who's CN value was selected in the User Name field. It would also set the ##answer_6## value to the samAccountName value.
This may be a "simpler" method to achieve what was asked in #2437.