Skip to main content
Nintex Community Menu Bar
Question

Snippet to Uncheck a checkbox?


Forum|alt.badge.img+3

I feel like this is a very simple question, but I have a checkbox at the end of a wizard I need to uncheck, but I would like the field to render unchecked without the user having to manually uncheck it.

Is there a basic rendering snippet I can use to uncheck the box?

Translate
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

Forum|alt.badge.img+9

For starters you could set the default value of the field to false. But assuming you want to use JavaScript, I would use a page load snippet, that runs when the page loads. Create a new snippet of type “inline” and add the following:

(function(skuid){&nbsp; &nbsp; var $ = skuid.$;<br>&nbsp; &nbsp; $(function(){<br>// The name of the Model your checkbox is in&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; var model = skuid.model.getModel('YourModel');<br>var row = model.getFirstRow();<br>&nbsp; &nbsp; &nbsp; &nbsp; model.updateRow(row,{<br>// replace YourFieldName with the API name of your checkbox<br>YourFieldName: false<br>});<br>&nbsp; &nbsp; });<br>})(skuid);&nbsp;
Translate

Forum|alt.badge.img+13

If you always want the checkbox to be unchecked by default, Moshe’s suggestion should work.

But if you only want to uncheck it when you get to a particular step (and otherwise have it remain checked) then you might want to build in the logic to un-check the checkbox into your Wizard Button.

Wizard Button can run a sequence of Actions — using Skuid’s “Action Framework”. Just change the Action Type of your button to be “Run Multiple Actions”. Add 2 Actions:

1. Update a field on row(s)
2. Navigate to Step

Action 1 can be used to uncheck your checkbox, and Action 2 will actually move the user to the step where the checkbox appears.

Here are screenshots of an example “Next Step” button i created in a wizard, where the next step is “step2”, but it can be whatever step you want to go to.





NOTE: if the “Navigate to Step” option does not show up for you, make sure you are on Skuid 5.13 or higher — if you’re not, head to skuidify.com/SkuidReleases and install the latest release.

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings