PHP code example of contenir / contenir-formbuilder
1. Go to this page and download the library: Download contenir/contenir-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/ */
contenir / contenir-formbuilder example snippets
use Contenir\FormBuilder\Definition\FieldDefinition;
use Contenir\FormBuilder\Definition\FormDefinition;
use Contenir\FormBuilder\Definition\GroupDefinition;
use Contenir\FormBuilder\Definition\RowDefinition;
use Contenir\FormBuilder\Definition\SectionDefinition;
use Contenir\FormBuilder\FieldType\FieldTypeRegistry;
use Contenir\FormBuilder\Registrar\WebhookRegistrar;
use Contenir\FormBuilder\Render\FormMarkup;
use Contenir\FormBuilder\Service\FormBuilderService;
use Contenir\FormBuilder\Service\FormSubmissionService;
use Contenir\FormBuilder\Validator\ValidatorFactory;
$definition = new FormDefinition(
id: 1,
slug: 'contact',
title: 'Contact us',
submitLabel: 'Send',
sections: [new SectionDefinition(id: 1, key: 'main', groups: [
new GroupDefinition(id: 1, rows: [new RowDefinition(id: 1, fields: [
new FieldDefinition(id: 1, type: 'text', name: 'name', label: 'Name',
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.