Forum Discussion
APM - 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"
But they are set as a single value.
Thanks and regards
2 Replies
- Lucas_Thompson_Historic F5 Account
There isn't really a built-in way to do this. You'd have to write up some javascript to append the option values into the input element and put that in the Advanced Customization Logon Page. Not too tough, but you'd have to have some familiarity with web programming or pass the project to someone who does, I'd estimate a few hours of dev work and a few hours of cross-browser testing.
- Alessandro_Cano
Nimbostratus
I'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
* 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