1. Go to this page and download the library: Download rootcstar/form-builder 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/ */
rootcstar / form-builder example snippets
use RootCStar\FormBuilder\Forms\FormBuilder;
$form = FormBuilder::create()
->formId('my-form')
->apiUrl('/api/endpoint') // API endpoint for form submission
->proxyUrl('/proxy/endpoint') // Optional proxy URL (defaults to apiUrl if not set)
->redirectUrl('/success') // Optional redirect URL after submission
->apiMethod('POST') // HTTP method (defaults to POST)
->title('Form Title') // Optional form title
->subtitle('Form Subtitle'); // Optional form subtitle