aleixmorgadas’s avataraleixmorgadas’s Twitter Archive—№ 277

  1. It took me a while to find an issue with @nuxt_js and @Netlify forms. Somehow, in the page where I had a <form netlify>... the Vue scripts logic stopped working. Neither the logic from other components worked nor the component itself logic.
    1. …in reply to @aleixmorgadas
      In order to make the form work with netlify and nuxt, what you need to do is to submit the form as AJAX instead. And not add netlify attribute to the form tag. Then, all the page worked again. docs.netlify.com/forms/setup/#submit-javascript-rendered-forms-with-ajax
      1. …in reply to @aleixmorgadas
        Plus: If you load a page where you haven't the form there, Vue logic loads correctly. If you load directly to the page that contains the form, it breaks. 🤷 I attach an example of a button with a custom onclick event. First image is what it how it look like, second with the bug
        oh my god twitter doesn’t include alt text from images in their APIoh my god twitter doesn’t include alt text from images in their API
        1. …in reply to @aleixmorgadas
          Notice the event tag in the first image that doesn't appear in the second.
          1. …in reply to @aleixmorgadas
            Here a source code example that causes the bug github.com/aleixmorgadas/nuxt-netlify-form-issue
            1. …in reply to @aleixmorgadas
              A @Netlify page to reproduce the issue nuxt-netlify-form-issue.netlify.app/