1. Go to this page and download the library: Download shazzad/wp-form-ui library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shazzad / wp-form-ui example snippets
use Shazzad\WpFormUi;
WpFormUi\Provider::setup();
use Shazzad\WpFormUi;
add_action('wp_enqueue_scripts', function(){
WpFormUi\Provider::enqueue_form_scripts();
});
add_action('wp_ajax_do_something', function(){
$data = stripslashes_deep($_POST);
// Process the form data and update settings, e.g., update_option('my_settings', $data);
wp_send_json([
'success' => true,
'message' => __('Form saved')
]);
});
// Handle submission for non-logged-in users
add_action('wp_ajax_nopriv_do_something', function(){
// ... same as above
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.