Forum Discussion

Jason0's avatar
Jason0
Icon for Nimbostratus rankNimbostratus
Feb 19, 2019

APM Custom Login Page - 11.6.3

I'm trying to setup a custom APM login page with a radio field where users can select the region they want to access. Different users have access to different regions, so the number of options will vary by user. APM is doing an Active Directory query and tracking region permissions in a semicolon delimitated list, which is stored in a custom APM variable.

I went into advanced APM customization and edited the login page to use my APM variable as the values for array item 4, but instead of each region being presented as a login selection, they are are listed as one object. Any idea how I can expand this list prior to HTML rendering?

$fields_settings = array(
1 => array( "type" => "text", "name" => "username", "varname" =>"username", "rw" => "1", "caption" => '%[logon_field_1]', "selectvalues" => "" ),
2 => array( "type" => "password", "name" => "password", "varname" =>"password", "rw" => "1", "caption" => '%[logon_field_2]', "selectvalues" => "" ),
3 => array( "type" => "none", "name" => "field3", "varname" =>"field3", "rw" => "1", "caption" => '%[logon_field_3]', "selectvalues" => "" ),
4 => array( "type" => "select", "name" => "region", "varname" =>"region", "rw" => "1", "caption" => "Region", "selectvalues" => "%{session.custom.region}" ),
5 => array( "type" => "radio", "name" => "field5", "varname" =>"field5", "rw" => "1", "caption" => "Test", "selectvalues" => "Region-1;NDC2:Region-5;Region-11" ),
);

1 Reply

  • Is this the first page in the VPE? How are you populating that variable before they've put in their user/pass to do the AD lookup? You could add a popup box before that page to make sure the variable is set.

     

    The pages are all php that gets processed before it's sent out, so as long as the variable is formatted properly (sounds like it is), it should automatically show up as a select input. If you look through the rest of the PHP I'm sure there's a function that expands each of them depending on type, etc.

     

    Try adding a second login page after you've done the first login and AD query, and on that second page put the dropdown with the custom variable.