Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Workarounds : Expandable Array checkconditions function

  • first
  • first's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 5 months ago #126432 by first
Hi ,

I am trying to modify the script provided here according to my requirement but I am not able to figure out what below function is doing ..

manual.limesurvey.org/Workarounds:_Manip...ipt#Expandable_Array
Code:
$( '#question' + qID + ' td.answer input.radio' ).click(function (event) {
 
                                if ($(this).parents('tr:eq(0)').attr('name') != 'clickedRow') {
                                        addRow();
                                        $(this).parents('tr:eq(0)').attr('name', 'clickedRow');
                                }
 
                                // The original function of the click event
                                checkconditions(this.value, this.name, this.type); //OMdev: Please let me know what this function is doing and where it is defined.
                        });
 

Survey Designer and Programmer
The topic has been locked.
  • first
  • first's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 5 months ago #126433 by first
I also suggest to have a link in each workaround back to forums for discussion about that workaround so that whenever someone is browsing workaround and have some query they can follow that link back to forums otherwise they create new thread. What do you say!!

Survey Designer and Programmer
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 5 months ago #126447 by tpartner
That fires the checkconditions() function which is inserted when Expression manager is used. This function dynamically handles questions that are shown/hidden by relevance. (search the source code of the page to see the function)

That snippet looks a little old, maybe try something like this:

Code:
var el = $(this);
checkconditions($(el).attr('value'), $(el).attr('name'), $(el).attr('type'));

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose