Serialize any input inside an element