Flexi Task with only one option - auto selected

  • 11 September 2017
  • 0 replies
  • 45 views

Userlevel 4
Badge +11

Hi all,

 

during last years, several times I've encountered projects when the best suitable action in order to ask a user to do something in a workflow was a Flexi task action with just one outcome..

 

If the customer is using also Nintex Forms and because Outcome is a mandatory field, their following question is always: "Is it possible to autoselect the only option?" and "Is it possible to make it hidden?"

 

Until the use of the new Responsive Designer (at this moment available only for Nintex for O365), the only option in order to achieve this is the use of javascript, and I want to share with you how I do this:

  1. Add a class to the decision field (in my case "decision")
  2. Go to Form Settings and in Advanced Javascript put the following script:

NWF$(document).ready(function(){
NWF$('.decision input').attr('checked','checked');
//NWF$('.decision').hide(); //remove comments if you want to hide the control
 });

With the above script, the option inside the element with "decision" class will be selected, in case you want also to hide it, you can remove the comment on last line so it will be hidden from form..in this case you can also remove the corresponding label and panel (think about the Delegation link) in order to reduce the space of the form, just move the control somewhere in the form, also overlapping some other fixed control (e.g over the logo), just to keep it in the form but without occupying additional space.

 

Hope this post may help someone and make him/her save some time..

 

Giacomo


0 replies

Be the first to reply!

Reply