2017 © Pedro Peláez
 

library forms

Predefined controls for Nette\Forms

image

inteve/forms

Predefined controls for Nette\Forms

  • Sunday, April 8, 2018
  • by janpecha
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,025 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Inteve\Forms

Build Status Downloads this Month Latest Stable Version License, (*1)

Controls for Nette\Forms., (*2)

Donate, (*3)

Installation

Download a latest package or use Composer:, (*4)

composer require inteve/forms

Library requires PHP 7.2 or later., (*5)

DateInput

$form['date'] = new Inteve\Forms\DateInput('Date:', 'Error message for invalid date.');
$form['date']->setDefaultValue(new \DateTimeImmutable('2018-01-01 20:18'));
$form['date']->setDefaultValue(new \DateTime('2018-01-01 20:18'));

$form['date']->getValue(); // DateTimeImmutable|NULL

DateTimeInput

$form['datetime'] = new Inteve\Forms\DateTimeInput('Datetime:', 'Error message for invalid datetime.');
$form['datetime']->setDefaultValue(new \DateTimeImmutable('2018-01-01 20:18'));
$form['datetime']->setDefaultValue(new \DateTime('2018-01-01 20:18'));

$form['datetime']->getValue(); // DateTimeImmutable|NULL

You can set timezone for HTML value., (*6)

$form['datetime'] = new Inteve\Forms\DateTimeInput('Datetime:', $errorMessage, 'Europe/Prague');

TimeInput

$form['time'] = new Inteve\Forms\TimeInput('Time:', 'Error message for invalid time.');
$form['time']->setDefaultValue(new \DateTimeImmutable('2018-01-01 20:18'));
$form['time']->setDefaultValue(new \DateTime('2018-01-01 20:18'));
$form['time']->setDefaultValue(new \DateInterval('PT20H18M'));

$form['time']->getValue(); // DateInterval|NULL

Others

  • HtmlInput
  • UrlPathInput
  • UrlSlugInput

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/, (*7)

The Versions

08/04 2018

dev-master

9999999-dev

Predefined controls for Nette\Forms

  Sources   Download

BSD-3-Clause BSD-3

The Requires

 

29/01 2018

v0.1.0

0.1.0.0

Predefined controls for Nette\Forms

  Sources   Download

BSD-3-Clause

The Requires