changed button type to submit
added function to pull val from input