Run custom field JS only if needed