make the button be a submit code example Example: submit button <button type="submit" form="form1" value="Submit">Submit</button>