Display More Information text when a field value is changed

kb22
Kilo Contributor

I know the onLoad script for automatically displaying More Information text, but was wondering if it's possible to only open it if a field is changed after opening i.e. type of request = 'delete'?

1 ACCEPTED SOLUTION

Your client script would watch the type_of_request variable. The (untested) script would look like this:



function onChange(control, oldValue, newValue, isLoading) {


  if (isLoading || newValue == '') {


          return;


  }


if (newValue == 'delete') {


      var myVar = g_form.getControl('comments_note');


      if(myVar) {


                  var myVarHelp = $('question_help_IO_' + myVar.id.split(':')[1] + '_toggle');


                  toggleVariableHelpText(myVarHelp);


      }


  }


}


View solution in original post

11 REPLIES 11

Thanks Chuck,.


You're a prince among men!


I'll test it out later today


You're very welcome. I think you gave me the answer really... shhh!



Let me know what you find.


Hi Chuck,



Worked like a charm - Well done! Again many thanks!



Kevin


Happy to hear you got your requirement met. Thanks for participating in the community.


How could I get this to hide if the value changes?   For example, I have this working if 'newValue == 'Yes', but how could I get the help text to be hidden again if value = 'no'?