Is carrier off, wifi on possible?

I'm just about to spend a few days in Madrid and I don't want to make/receive phone calls or messages while I'm there. I would like to use my iphone5 in wifi areas for information, directions, e-mail etc... and not incur any data roaming charges. Is there a way to turn my carrier/network off, while leaving wifi? Thanks people.
Indeed... Airplane Mode, then turn wifi on...
Brilliant. Thank you both.
Enjoy the trip
Great tip guys. I didn't know this was possible.

Original thread: https://forums.imore.com/threads/is-carrier-off-wifi-on-possible.253810/