Is there a way to detect if a action is triggered from a control panel form?
If anyone comes here looking for this answer for Craft 3 the function you are looking for is Craft::$app-&gt;getRequest()-&gt;getIsCpRequest()