Here is simple script to toggle touchpad on laptop on or off
First you have to discover which device id is actually touchpad - you can do that using xinput list. There touchpad will be shown as one more mouse. Then you can update script below with touchpad's ID on your system (replace <ID> with actual number). You can bind this little script to some key to be able to easily toggle touchpad on or off.