Render a camera view to a texture?

I got the toggle working through a couple boolean variables connecting the on and off toggle.