I've set a radio group array to arrange the values in descending order. I would like to have the first value (the largest number) to be pre-selected. I've tried a number of things in the "selected value" field but can't figure out the proper syntax. I can get it to work if I know ahead of time what the largest number will be... unfortunately, with the array this number changes constantly.
Any thoughts?
Thanks,
Matt
Well it should be var read data, definitely not var radio.
Put a debug in as the last action on page load and post it
So if you don't put anything in selected value and you don't put an empty option at the top it should ALREADY be selected. So if you don't put anything in the selected value box, what happens for you?
Either that OR put a PHP action after your read data, loop through ($this->get("read_data10", "deault")), return the largest number, and then in Selected Value put {var:phpaction}
You can't just put that in the PHP action you have to actually put code in there. That code I gave you was how to get the array you were after, now you need to search through it
Sorry, wish I understood a little better but not as versed as I'd like to be. I need to add additional code to the PHP action or do I add it in javascript?
something like this in PHP?
echo(max(array(var:read_data10));
Thanks again healyhatman, took me a little bit but I finally got it to work.
Still not that used to dealing with PHP but I'm learning.