How and where to define form's action in grapesjs
Question
Hello All,
how can i get data from forms in grapesjs.
i have droped a form on canvas as u can see that below
.
so there is an action property as as mentioned in above snapshot covered by red coloured rectangle. i have put and action value. so where i can define this action in my code in which i can get that form's data .. i am sharing my code
editor = grapesjs.init({
autorender: 1,
container: '#gjs',
components: '<div class="txt-red"></div>',
style: '.txt-red{color: red}',
plugins: ['grapesjs-blocks-basic','gjs-preset-webpage' ],
})```
**overall means when i will click on form's send button then where or in which function i will get that form's data or that function where should be defined**
let me know please
Answers (3)
Hello Team,
Need your suggestion about the same because of we need to use form builder in our application so we can easily customise our form also we need to get user input.
Waiting for your reply...
Thanks,
If you want to define the action before dropping the form (eg. defined in the block) you just need to specify it as an attribute <form action="your/end/point" method="POST">
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1514
How to add video block on blockManager
Hello All. i want to add a video block on blockmanager same as mentioned on below snapshot i am using following code for adding video block...
Issue #392
Define selected class.
Hello @artf , Is there a way to automatically select the class that is created on elements with custom styles. I'm currently trying to dyna...
Issue #1398
GrapesJS translate
Hello @artf , Do I want to translate all functions into Hungarian, so that I can do it? Please give me examples of how to modify these text...
Issue #1723
[QUESTION] replacing particular text in dropped component
Hi, I get the value from custom traits from what I entered but I don't know how to change the particular value in dropped component and ren...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.