April 27, 2024

MoDCore

Welcome to the core

Change text function

This little function will change the text based on the answer of a previous question.

function Complaint(qid)
{
            //set default question text
            var txt = “”;
            //change question text if rating question is equal to 1
            if(f(qid).any(‘1’)) { txt = “Please confirm what the nature of the complaint was, when it was made, what action was taken, by who and when”; }
  if(f(qid).any(‘2’)) { txt = “Please confirm what the nature of the complaint was, when it was made, what action needs to be taken now, by who and by when”;}
            return txt;
}
In the question you want to display either text use the code – ^Complaint(‘qnr_complaint’)^
Copyright © All rights reserved. | Newsphere by AF themes.