Create form from PHP (not with UI)

[ad_1]

Hi,

I finally found a way.

I exported all forms in json from the dev site and put the file in the plugin.
I’m using the acfe function acfe_import_form($args) to import forms on my plugin activation.

I’m running something like that (inside my plugin class) :

$acfe_forms_file = self::get_plugin_dir() . "acfe_forms_settings.json";
if ( file_exists( $acfe_forms_file ) && function_exists( 'acfe_import_form' ) ) {
    acfe_import_form( file_get_contents( $acfe_forms_file ) );
}
  • This reply was modified 10 minutes ago by Agent 3W.
  • This reply was modified 10 minutes ago by Agent 3W.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer