Issue #1539Opened October 24, 2018by himanshubudhlakoti0 reactions

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 4444444.

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)

AshishTiwariMEANOctober 25, 20180 reactions

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,

artfOctober 30, 20180 reactions

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">

lock[bot]October 30, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.