Prefers To Do It In His Pants

My toddler is well trained in going to the toilet on time. But he refuses to defecate in the toilet and insists on doing it in his pants!