how to use nette/forms as its minimal form
Notice: This thread is very old.
- Ja
- Member | 260
Hi,
I need minimal version of nette/forms and I thought it should be the
standalone part which can be used without anything else. As I see in composer,
it looks like it is not the whole true.
- Do nette/forms need for itself another libs as I see it in composer?
<?php
"require": {
"php": ">=5.3.1",
"nette/component-model": "~2.2",
"nette/http": "~2.2",
"nette/utils": "~2.2"
},
"require-dev": {
"nette/tester": "~1.0",
"latte/latte": "~2.2",
"tracy/tracy": "~2.2"
},
?>
- How could I use nette/forms without Composer? Should be sufficient to include src/Forms/Form.php?
thanks in advance!
- matopeto
- Member | 395
i use only:
<?php
{
"require": {
"nette/forms": "@beta"
},
"minimum-stability": "beta"
}
?>
If in composer are dependencies, nette forms can't do job without them.
And then:
<?php
<?php
require 'vendor/autoload.php';
use Nette\Forms\Form;
$form = new Form;
$form->addText("uri", "Uri")->setRequired()->setAttribute("size", 100);
...
?>
Last edited by matopeto (2014-04-25 18:32)