Forum Discussion
Alessandro_Cano
Nimbostratus
Jan 07, 2016APM - Radio control values from variable
Hello,
is it possible to set the values of a radio control using a custom variable?
I've tried using %{session.custom.values} as values, where session.custom.values is "Value1;Value2;Value3...
Alessandro_Cano
Nimbostratus
Jan 08, 2016I've found the solution using this example
Problem can be solved adding this javascript to "function OnLoad()" in logon.inc:
var full_group_list = "%{session.custom.groups}";
var groupArray = full_group_list.split(";");
groupArray.sort();
var newDiv=document.createElement('div');
var radioHTML = "";
for(i=0; i"+groupArray[i]+"";
}
newDiv.innerHTML= radioHTML;
document.getElementById("dynamicInput").appendChild(newDiv);
dynamicInput element needs also to be defined:
case "radio":
foreach( $options as $k=>&$o ){
$fieldStr .= "{$o}";
}
$fieldStr = "";
break;
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects