[Vuejs]-Vue Get form data as object when taken in as a slot

0👍

You could use something like element.querySelectorAll('input, select, textarea') or document.forms['form_name'].getElementsByTagName('input'); to capture all the form elements. You could then iterate though them to find the values and construct a JSON object (or whatever format you need the data in).

Leave a comment