Some of somas answers have great potential for a recipe https://processwire.com/talk/topic/7684-modify-form-object/