• Comparing Formit Values#

  • dmiller_24 Reply #1, 6 months ago

    Reply
    Does anyone know how I can compare values from a formit variable? Here is an example of what I would like to do.

    The following is what my database would look like:
    Artist Song Rating 1 Rating 2 Rating 3
    LeAnn Rimes Commitment B C B
    LeAnn Rimes What a wonderful world C C A
    LeAnn Rimes Twisted Angel B C A
    Garth Brooks Dance A A B
    Garth Brooks Its Your Song C B A

    I Want to display it in a form like the following - but I'm trying to use formit to display it

    LeAnn Rimes Rating 1 Rating 2 Rating 3
    Commitment B C B
    What a wonderful world C C A
    Twisted Angel B C A
    Garth Brooks Rating 1 Rating 2 Rating 3
    Dance A A B
    Its Your Song C B A

    Is there anyway to make this display like this, or will have have to actually read this information from the database. I'm was using a for loop which goes through all my formit values, which I do get from the database using formit and a hook. Then once I have the values, I call a snippet and try to display this stuff (displays fine using the formit), but I need to be able to compare formit variables.

    Overall, if I can compare formit variables and/or store them into a php variable in a snippet, I could figure this out. I'm leaning towards I'm going to have to re-read the entire database in the snippet and store it into an array and then display it that way.

    Hopefully this makes sense, and any help would be appreciated.

    Thanks, Dustin