I had an interesting problem today. A submit button in a form wasn’t working – unless I reloaded the page. I spent some time researching and found a few answers – for one person they hadn’t closed a tag properly. Someone else suggested it had something to do with turbolinks. Another answer said that the submit button needed to be nested within the form. Here was the original code:
As it turns out, the div has an effect. The submit button is within a separate div, within the form tags. When I changed the code to what’s below, it started working.