How can I create an 'adding' function to the form