PHP code example of k1sul1 / wp-libre-formbuilder
1. Go to this page and download the library: Download k1sul1/wp-libre-formbuilder 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/ */
k1sul1 / wp-libre-formbuilder example snippets
wplf()->plugins->Formbuilder->addField([
'key' => 'U0', // Used to differentiate fields from others, especially when two fields share the same name
'name' => 'Range', // Name shown to the end user
'field' => '<input type="range" name="range" value="3" min="1" max="5">', // HTML fragment. Attributes will be editable.
'template' => '<div class="wrapper-div"><div class="wplfb-field-container"></div></div>', // HTML fragment for wrapping field with
'label' => 'On a scale of 1 to 5, how did we do?', // Default label for input, leave empty to disable
]);