Article

Multiple LDAP Values in a NAM Form Field

Author Info

9 January 2008 - 2:10pm
Submitted by: Misterwippy

article
Reads:

2239

Score:
2
2
1
 
Comments:

0

Problem

A Forum reader recently asked:

"I'm in the process of upgrading an iChain setup to Access Manager 3. There seems to be an equivalent for almost everything, except that the Form fill policy only seems to allow one attribute per text input field. It appears that the NAM interface has no way of stuffing two LDAP attributes in the field. Is this possible to do?"

And here is the response from Rowan Truscott ...

Solution

If you have another field on the form that you can temporarily put the second attribute into, then you would be able to apply some Javascript before the form is submitted to stuff the two values together.

I used the "value" for the Submit button. So....

Add GivenName to Name_on_Account
Add SN to submit button value (lets call it submit)

Add the following javscript to "Enable JavaScript Handling > Statements to Execute on Submit" section of the form fill policy:

function buildName() {

var givenName=document.getElementById("Name_on_Account");
var values= givenName.value;

var sn=document.getElementById("submit");
var values= values + sn.value;

alert(""+values);

document.getElementById("Name_on_Account").value=values;
}

buildName();

That might do the trick. And remember to take out the alert line once you have tested it.


Author Info

9 January 2008 - 2:10pm
Submitted by: Misterwippy




User Comments

© 2009 Novell, Inc. All Rights Reserved.