I have front-end form on Vue.js and Craft CMS for the backend. I need form. And I want to save data from the form in Craft CMS. How to save data from user frontend to backend on Craft CMS?
1 Answer
You would not use the headless API to submit content in into Craft, as neither the GraphQL or Element APIs support writing.
The frontend entry form functionality is fairly well documented. You would just need your frontend to build out a post request including the correct action, CSRF token, and whatever fields are needed. The action endpoint will automatically return a JSON response if it is posted to by an AJAX request.