Sorry I didn't answer this sooner, but it's been awhile since I did one of these, so I had to double-check...
1) Make a Wooden Box (Carpentry Skill). It must be lockable, so high Carpentry skill is needed.
2) Make your trap (Tinker skill). The Dart Trap is the best and easiest, but it takes a little fletching skill to make the Crossbow Bolt.
3) After making the trap, you will be asked to target a container, so target the wooden box.
4) Lock the box.