Added code to for live preview of pic inputs