Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [VishalT] How to do this: Add multiple unique randomized hidden fields from desired range: Edit Log

Here is the list of edits for this post
Re: [VishalT] How to do this: Add multiple unique randomized hidden fields from desired range
Hi Vishal,

I don't think that would work. $City is not defined in the sub.
If you are calling the routine from a detailed Page for examle you would probably do it like that:
Code:
<%rand_string($City,$State)%>

and

Code:
sub {
my ($City, $State) = (@_);
my @array = (
"value one $City for array",
"value two for array",
"value three for array $State "
);

use List::Util qw(shuffle);
@array = shuffle(@array);
return { rand_string_variables => \@array }
}

Regards

Niko

Last edited by:

el noe: Apr 3, 2020, 12:37 PM

Edit Log: