Using Blocks When Publishing Through WordPress
If you use the block editor and use Gravity Forms to publish a post, it does not use the heading or paragraph blocks to publish the content, it dumps the content in a classic block. I had someone ask me this question yesterday: > Hi, when creating a post in WordPress, one can insert a table into the post by choosing the "table block". Can Gravity Forms allow a user to submit a WP table through a frontend form? Thank you for any help. The short answer is, Yes. The long answer is it require custom code. Not a lot and nothing too tricky but I was able to come up with a simple solution for this specific use case that creates a table with the submitted content. You can grab the code snippet here: https://gist.github.com/chrisegg/e83999289f641fcf400d9e3a0a36c9ea How to Use: 1. Update the form ID check to match your target form. 2. Replace the merge tags ({Name:1}, {Email:2}, etc.) with your own field labels and IDs. 3. Add this snippet to a plugin, MU-plugin, or your theme’s functions.php file. 4. Ensure the Gravity Forms Post Fields are configured to create a post. This is a simple solution that addresses a single use case, so let me know if you need help expanding upon this to fit your solution. Be sure that you are using the Post Fields shown in the screenshot. In this specific example I am using the Custom Fields type for the Email, Name, Company fields. I've also included the form template file so you can import it and see the setup. Enjoy! Chris