Oh dear… Something peculiar happened. The code I posted above was working fine for V4 but I just updated to V5 PRO and suddenly every time I hit update or publish, ALL fields are cleared and return to holding no value.
Any advice would be greatly appreciated.
Many thanks.