cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

NCAA bracket in Nintex Form

Jump to solution

I'm trying to make the NCAA basketball bracket out of the Nintex form and push data to a list. So in the company we can all submit a bracket and who ever guessed the most wins will get the final jackpot. But i'm having issue on the regional semifianls pick (2nd drop down)

here is my set up.

All of the initial seeds will be using label function. here for example we have michigan, cin as one game and Kentucky and Duke is one game (just example).

And then the 1st drop down will have Michigan and Cincinnati as the choice. users will pick.

Here is the issue. once i made selections I can't seems to get the final drop down to pick up whatever I have selected. Any ideas on how can i achieve this?

Reply
21 Replies
philipplucas
Nintex Newbie

Re: NCAA bracket in Nintex Form

Jump to solution

Hi Gerry,

please tell/show how you configured your last dropdown. How are the possible drop down values populated? I guess there is a connection between the dropdowns?!

Cheers

Philipp

0 Kudos
Reply
janeyres
Nintex Newbie

Re: NCAA bracket in Nintex Form

Jump to solution

Hi Gerry,

You can do this really easily in script, this code assumes the controls are wrapped in a parent panel with class "parentPanel" and that classes "choiceGame1" and "choiceGame2" have been applied to the 2 dropdowns respectively. The final dropdown has class "choiceResult".

NWF$(document).ready(function()
{
    NWF$("div.choiceGame1").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame1").find("select").find(":selected").text();
        var option2 = NWF$(".parentPanel .choiceGame2").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult").find("select").empty();
        NWF$(".parentPanel .choiceResult").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");
        NWF$(".parentPanel .choiceResult").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });
    NWF$("div.choiceGame2").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame1").find("select").find(":selected").text();
        var option2 = NWF$(".parentPanel .choiceGame2").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult").find("select option").remove();
        NWF$(".parentPanel .choiceResult").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");
        NWF$(".parentPanel .choiceResult").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });
});

Jan

Reply
Not applicable

Re: NCAA bracket in Nintex Form

Jump to solution

Hi Jan!

THank you so much! This works very good so far! I have used your code made the first section.

my next question is since there 31 of these drop downs. is there a better way of declaring these values?

so far i have added more dropdowns. you can see the screenshots below and the code.

I will have to repeat these drop down to the bottom half of the teams. that's just one region. we have 4 total. So it will be one more drop down to pick between rf1 (region final) and rf2 to get one final team from this region and since total of 4 region, which also means we are picking final four. then two then final winner.

NWF$(document).ready(function()

{

    NWF$("div.choiceGame1").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame1").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceGame2").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult1").find("select").empty();

        NWF$(".parentPanel .choiceResult1").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .choiceResult1").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

    NWF$("div.choiceGame2").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame1").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceGame2").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult1").find("select option").remove();

        NWF$(".parentPanel .choiceResult1").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .choiceResult1").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

  NWF$("div.choiceGame3").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame3").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceGame4").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult2").find("select").empty();

        NWF$(".parentPanel .choiceResult2").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .choiceResult2").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

    NWF$("div.choiceGame4").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceGame3").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceGame4").find("select").find(":selected").text();

        NWF$(".parentPanel .choiceResult2").find("select option").remove();

        NWF$(".parentPanel .choiceResult2").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .choiceResult2").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

  NWF$("div.choiceResult1").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceResult1").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceResult2").find("select").find(":selected").text();

        NWF$(".parentPanel .rf1").find("select option").empty();

        NWF$(".parentPanel .rf1").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .rf1").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

  NWF$("div.choiceResult2").find("select").change(function () {

        var option1 = NWF$(".parentPanel .choiceResult1").find("select").find(":selected").text();

        var option2 = NWF$(".parentPanel .choiceResult2").find("select").find(":selected").text();

        NWF$(".parentPanel .rf1").find("select option").remove();

        NWF$(".parentPanel .rf1").find("select").append("<option value='" + option1 + "'>" + option1 + "</option>");

        NWF$(".parentPanel .rf1").find("select").append("<option value='" + option2 + "'>" + option2 + "</option>");

    });

});

this is the bracket that i'm trying to recreate in nintex.

http://wp.streetwise.co/wp-content/uploads//2015/03/Official-2015-March-Madness-Bracket-NCAA-Mens-Co...

0 Kudos
Reply
janeyres
Nintex Newbie

Re: NCAA bracket in Nintex Form

Jump to solution

I reckon this could go in a repeating section, I'll take a look at it tomorrow unless you beat me to it

0 Kudos
Reply
Not applicable

Re: NCAA bracket in Nintex Form

Jump to solution

haha i have thought about the repeating section. but the backend data collection is an issue for repeating section on nintex. because each of these drop downs are going into a list field and we have record of which user will win the final. take your time. thank you so much!

0 Kudos
Reply
Not applicable

Re: NCAA bracket in Nintex Form

Jump to solution

no idea why it seems like this js messes up the submission.

When i save and submit it, it will just go to an error page.

0 Kudos
Reply
sean_fiene
Nintex Newbie

Re: NCAA bracket in Nintex Form

Jump to solution

Hi Gerry,

I think I have a blog post that might help:

Dynamic Choices: Nintex Forms — informed

Thank you,

Sean Fiene

Reply
Not applicable

Re: NCAA bracket in Nintex Form

Jump to solution

hi Sean Thank you!

how would you solve if the choices are over 31? because we are picking from the 3rd round then regional semifinals, regional finals, then final 4, 2 and winner?

0 Kudos
Reply
janeyres
Nintex Newbie

Re: NCAA bracket in Nintex Form

Jump to solution

Hi,

Setting the choices using script is invalidating the page viewstate, I can get this to work with list lookups but not sure about how to get the filtering dynamic. I'll have to think about it!

Jan

0 Kudos
Reply