When a user task is assigned, I want to be able to create a checklist that a user needs to make sure is completed before selecting an action button. I would like to be able to use multiple checkbox fields each with multiple choices that all would be required. Is there a way to accomplish that?
Question
Question
Answer
APPROVED ANSWER
replied on April 23, 2014
You could do this by hiding (or disabling) the action buttons for the user task. Try this:
- Add the check CSS class to your checkbox field.
- In the CSS section of the CSS and JavaScript page, insert the following rule:
.button-wrap {display:none;}
- In the JavaScript section of the CSS and JavaScript page, insert the following code:
$(document).ready(function() { var $checkbox = $('#Field2-0, #Field2-1, #Field2-2'); $('.check input').change(function() { $(this).is(':checked') ? $(this).siblings('label').css({'text-decoration':'line-through'}) : $(this).siblings('label').css({'text-decoration':''}); $checkbox.filter(':not(:checked)').length === 0 ? $('.button-wrap').show() : $('.button-wrap').hide(); }); });
- Note the $checkbox variable's value. These are the selectors for each input box within your checkbox field. You'll need to change these selectors to match those found on your form.
0
0
Replies
replied on April 21, 2014
What we have done is create each Checkbox as individual fields, and then remove the Label from those fields. Then make all of them required, with only the one option in each field.
You can probably use CSS to make the fields get nice and close to each other.
2
0
replied on April 21, 2014
If it's not possible directly in Forms, you could hook up some custom JavaScript to prevent the form from being submitted until all of the checkboxes were set.
0
0
You are not allowed to follow up in this post.