How can I correct this so this function only occurs when a button is pressed. If the QA Inspection IN button is ticked it should post the comment I've created below. If it hasn't been ticked nothing should happen.
Here is the code.

*This post is locked for comments
I have the same question (0)