PHP code example of vulcandigital / silverstripe-birthdayfield
1. Go to this page and download the library: Download vulcandigital/silverstripe-birthdayfield 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/ */
vulcandigital / silverstripe-birthdayfield example snippets
class BirthdayForm extends Form
{
public function __construct(RequestHandler $controller = null, $name = self::DEFAULT_NAME)
{
$fields = FieldList::create([
$birthday = BirthdayField::create('Birthday', 'Birthday')
]);
$actions = FieldList::create([
FormAction::create('process', 'Submit Birthday')
]);
$validator = RequiredFields::create([
'Birthday'
]);
parent::__construct($controller, $name, $fields, $actions, $validator);
}
}
$birthday->setBootstrapRender(true);
$birthday->disableTitles();