cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
teddy0bear
Nintex Newbie

Set field based on button selection

I'm creating a multi stage form using Nintex forms 2013 where button clicks progress the panels. That part is setup and working with some custom javascript on the buttons. In addition to clicking the buttons, I want the value of the button (Yes or No) recordered in a list field so what they selected is recorded. There is a "Value returned" option on the button but it seems to be skipped over since I'm using javascript/client click on the button for the pannel progression. I'm also using multiple buttons and can't have the form saving/submitting/closing prematurly. Is there an easy way to do this?

Labels: (2)
0 Kudos
Reply
4 Replies
Not applicable

Re: Set field based on button selection

Are you trying to save the stage of the form? Let say user click the button, and it progress to different stages (hide and show the respective panel), and then when user edit the form, you want the form to load with the previous stage selected already?

If that's the case, you can setup the stage button with Choice control, and set the Display format to Options buttons​ and the Render as buttons ​to ​Yes​.

0 Kudos
Reply
teddy0bear
Nintex Newbie

Re: Set field based on button selection

No I'm trying to record which button they hit and save it. For example: Panel 1 will have a question: "Do you like cats or dogs?". One button will say cats and one button will say dogs (simplifying for ease). The user would hit Cats and it would progress to the next panel and the next question  "Do you prefer Black or White?". The user would hit "White" and it would go on to the next question. I need to record that the user hit Cats and White, preferably in a list field (or even if it recorded a value of 1 (Cat) or 0 (Dog) I could work with that). I can set it up so they select their answer and then hit next button to get to the next panel but I'm trying to simply it into one action.

I have played with the choice, render as buttons control but I can't connect it to a list field without loosing the button functionality.

0 Kudos
Reply
waltont
Nintex Newbie

Re: Set field based on button selection

There's def an easier way then using buttons unless there's some custom jobs you're trying to run using javascript...

The way I'd set it up is use drop down choice options with yes and no, tied to the columns you want to store that data in. Set the panel rules to display the appropriate panels based on the user's selection of those drop down boxes as well. Seems far more simple then buttons and a lot of javascripting unless you have to have those scripts run for other purposes.

0 Kudos
Reply
janp
Nintex Newbie

Re: Set field based on button selection

I believe you may be able to achieve the functionality still by using the choice control rendered as a button.

You can simulate the necessary button functionality (showing and hiding panels) via Rules - visible.

For instance, let's say I have a choice control with values:

Primary Constituent

Secondary Constituent

Interbedded Constituent

I will add a rule to a panel that is hidden if the following isn't true: not(equals(tabSelect,"Primary Constituent"))

This is then repeated for my other two panels.

If you don't want to go down this path, you can also use buttons and set the Button Action to JavaScript then fill out the Client Click field in the Advanced tab to be your JS function. e.g. NexPanel("Cat","White")

then in your form custom javascript you use js or JQuery to show/hide tabs and set the appropriate values for any field you want based on what was clicked ("Cat")

0 Kudos
Reply