auto-generating form value permutations..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jonKushner@gmail.com

    #1

    auto-generating form value permutations..

    id like to create a script that runs through a form, and autogenerates
    every single permutation for every single value, as well as option.
    The task is because I am currently working on a webservice project
    where I am feeding in nightly a set of values from an external data
    source, and populating my form with those values. In the end, I end up
    resending a new query to this datasource with a custom url, including
    as parameters the values chosen. Sooooo, the end goal would be to have
    one massive array which I can see all of the various URL's that get
    created for the user.

    I hate bleek descriptions, so heres a little visual:

    element1 =selectbox('opt 1','opt2','opt3 ')
    element2 =textbox('val1' )
    element3 =multipleselect ('multopt1' through 'multoptN')

    so, a simple forloop on the 1st option within the first selectbox as
    my primary choice could produce several values.. here would be 2
    permutations:

    values[] = arr('opt1','val 1','multopt10') ;
    values[] =
    arr('opt1','val 1',array('multo pt10','multiopt 33','multiopt34 '));

    and then in the end( not what I am concerned about, but just to
    complete the example):

    URL://?selectboxid=op t1&textboxid=va l1&multiplesele ctid=multiiopt1 0
    -or-
    URL://?selectboxid=op t1&textboxid=va l1&multiplesele ctid[]=multiiopt10
    &multipleselect id[]=multiiopt33&mu ltipleselectid[]=multiiopt34

    conceptually, i just can't think how to approach this.

    ideas?
  • C. (http://symcbean.blogspot.com/)

    #2
    Re: auto-generating form value permutations..

    On Jan 17, 6:22 pm, "jonKush...@gma il.com" <jonKush...@gma il.com>
    wrote:
    id like to create a script that runs through a form, and autogenerates
    every single permutation for every single value, as well as option.
    The task is because I am currently working on a webservice project
    where I am feeding in nightly a set of values from an external data
    source, and populating my form with those values. In the end, I end up
    resending a new query to this datasource with a custom url, including
    as parameters the values chosen. Sooooo, the end goal would be to have
    one massive array which I can see all of the various URL's that get
    created for the user.
    >
    Erk, suppose you M widgets on your form, each of which can be in N
    states - the number of combinations are N to the power of M.

    You're going to need a lot of memory and a fast processor.

    Or read up on "least pairs test design"

    C.

    Comment

    Working...