Nintex Connect

The Official Community Site for Nintex Software Products, including Nintex Workflow 2007, 2010 and 2013; Nintex Workflow for Project Server 2010; Nintex Reporting 2008 and Nintex Analytics 2010; Nintex Forms 2010; Nintex Live and Nintex SmartLibrary.
Welcome to Nintex Connect Sign in | Join | Help
in Search

Show or Hide controls based on checkbox value - Java Error

Last post 01-19-2014, 7:42 PM by mayaci. 10 replies.
Sort Posts: Previous Next
  •  03-09-2012, 8:51 AM 22024

    Show or Hide controls based on checkbox value - Java Error

    We are attempting to show and hide additional controls based on a checkbox but are encountering a JavaScript problem.  Using the ConditionalDisplayOfControl.js script provided by Nintex we get a RepositionAndResizeOtherControls method not defined error on the line NWF.Utilities.RepositionAndResizeOtherControls(controlToConditionalDisplay, controlToConditionalDisplayTop, heightIncrease);.  Are we missing a script where that method is defined?  If I remove that line the script executes correctly except there is a large blank spot on the form where the controls are.

  •  03-12-2012, 11:46 PM 22069 in reply to 22024

    Re: Show or Hide controls based on checkbox value - Java Error

    Hi,

    Can you please send the entire JS file and error details to support@nintex.com and we can review it and then send you the required information.

    Please mention this forum post in your email so we can also update it accordingly.

  •  03-18-2012, 5:03 PM 22232 in reply to 22069

    Re: Show or Hide controls based on checkbox value - Java Error

    We've actually seen the issue resolve itself when using the new Forms build that was released 3/7/2012
  •  04-09-2012, 4:51 PM 22511 in reply to 22069

    Re: Show or Hide controls based on checkbox value - Java Error

    I am having a similar problem. I followed the instructions here: http://connect.nintex.com/files/folders/tutorials_and_how_tos_nf2010/entry22008.aspx but it does not work. I don't see any errors. I am running NF 1.1.0.0.

    Also, I have some questions about the instructions:

    1. Page 9 - Panel settings, Visible is set to Yes. Shouldn't it be No (until the checkbox is checked)?

    2. Page 10 - Checkbox settings. It is not Connected to a field in the list. Is that required?

     

  •  04-16-2012, 11:50 AM 22602 in reply to 22232

    Re: Show or Hide controls based on checkbox value - Java Error

    Could you clarify exactly what you mean by that, because I haven't seen any issues resolved in regard to using the .js file in the tutorial; nor have I seen any response that is worth its weight in gold. If you would be so kind as to explain a step by step process how you got that .js file to work, I would be delighted.

    Thank you

    Filed under: , ,
  •  04-19-2012, 11:22 AM 22686 in reply to 22602

    Re: Show or Hide controls based on checkbox value - Java Error

    I finaly got forms to work with the .js file.

  •  05-09-2012, 12:35 PM 22925 in reply to 22686

    Re: Show or Hide controls based on checkbox value - Java Error

    Hi,

    I am having similar issues where I simply can't get it to work.  What ended up being the issue you were having?

     Thanks!

     Geoff 

  •  05-09-2012, 3:20 PM 22929 in reply to 22925

    Re: Show or Hide controls based on checkbox value - Java Error

    Hello Geoff,

     For us, it had something to do with the Nintex update. After the update was completed, I included the .js file link within the settings of the form. You may have to put the entire URL of the Style library location where your .js file is stored. If you actually analyze the .js file, you'll notice there are 6 functions. The bottom 4 functions make up the top 2 functions. You'll only ever need to use the top two functions: EnableConditionControlOnView(parameter) and DisplayControlConditionally(parameter 1, 2, and 3). The EnableConditionControlOnView() function takes a parameter of whatever js variable you want to affiliate to your selection control; radio button 1, 2, or 3 shows panel 1, 2, or 3. The parameter in EnableConditionConrtolOnView(Me) is placed in the second parameter section of DisplayControlConditionally(1, Me, 3). Mainly, you are going to use DisplayControlConditionally() to set up your CSS class, JS variable,and your display condition. You just have to use those functions in the Custom JavaScript section to set them up. Remember, everytime you want to add a new choice control to select a panel or display a panel, you always have to call the function AGAIN, and set up your parameters again for however many panels and choices you have. Don't forget to put those lines 1|, 2|, or 3| after each choice selection. It has something to do with the displayCondition (the third parameter for DisplayControlConditionally().

    I hope this helped a little. My biggest suggestion is to look at the .js file, at the 6 functions. The bottom 4 make up the top 2. The top two are called in the Custom Javascript section. Look at the affiliation between the .js file and the downloads.

  •  06-08-2012, 6:03 PM 23370 in reply to 22069

    Re: Show or Hide controls based on checkbox value - Java Error

    Nintex Team,

     The Javascript functions are not working in the Preview button, but working after publishing the form. Is there something we are missing from our environment side or this could me fixed from the Nintex side? Again, this is a very cool feature and it could be better if we can preview the working before publishing it.

     Thanks,

    Vinay.

    Filed under: ,
  •  10-28-2013, 9:22 PM 32158 in reply to 23370

    Re: Show or Hide controls based on checkbox value - Java Error

    I'm having a similar problem, except I have a choice field that allows multiple values. Because of the way it is rendered in the form, as singular check boxes with a value within a table, I am not able to use the DisplayControlConditionally function because the controlWithCondition gets a type of 'undefined', even  NWF$(NWF$(controlWithCondition).find("input:checked")).val() section of the function ShouldDisplayControl is undefined. Has anyone else had this problem?  We are using Forms 2013. 

     My field is an OOTB Choice field with string values. I have given it a JavaScript ID and am querying the values to show/hide panels based on the user selections. 

     Thanks 

  •  01-19-2014, 7:42 PM 33249 in reply to 32158

    Re: Show or Hide controls based on checkbox value - Java Error

    Dear Sabrina,

    Have you managed the checkbox values issue? Thansk!

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems