Comments (5)
Vypadá to na problém v makru, které vypisuje prvky do šablony. V proměných, které jsou šabloně prvku k dispozici, žádný $form
není.
Minimální kód:
// MyControl.php
use Nextras\Forms\ComponentControl;
use Nextras\Forms\Controls\DatePicker;
class MyControl extends ComponentControl
{
public function __construct($caption = NULL)
{
parent::__construct($caption);
$this['checkbox'] = new DatePicker('My checkbox');
}
}
<!-- MyControl.latte -->
{input checkbox}
class HomepagePresenter extends BasePresenter
{
protected function createComponentMyForm()
{
$form = new Form;
$form['myControl'] = new MyControl('My precious');
return $form;
}
}
<!-- šablona akce presenteru -->
{control myForm}
from forms.
Please, try https://github.com/nextras/forms/releases/tag/v2.0.2
from forms.
Unfortunately not working, I get an "end() expects parameter 1 to be array, null given" warning on line
if ($_label = end($this->global->formsStack)["checkbox"]->getLabel()) echo $_label ?>
There is no $this->global->formStack
variable in the template. Cache was deleted.
from forms.
Finally and hopefully fixed in https://github.com/nextras/forms/releases/tag/v2.0.3
from forms.
Works like a charm, thanks!
from forms.
Related Issues (20)
- DateTimePicker: Missing seconds support
- Partial rendering not working with BS3 macros HOT 1
- Extension instead of bootstrap copy-pasting? HOT 7
- way to set DateTimePickerPrototype variables HOT 1
- compatibility with nette 2.2.*?
- Not working autoloading. HOT 3
- DatePicker::setRequired() not propagated to javascript HOT 4
- Nevyplněné labely, vycentrování formuláře na střed HOT 5
- Presun volania služby nette.latteFactory z loadConfiguration do beforeCompile HOT 1
- Tag new version HOT 4
- Fix method parameters declaration in BS3InputMacros HOT 2
- Typeahead: nette validation problem when using hint HOT 1
- Bootstrap error rendering HOT 4
- Snippet support HOT 1
- Nette 2.4 compatibility HOT 7
- Nette 2.4: DatePicker false invalid result of validation HOT 5
- Undefined variable $_form, did you mean $form? HOT 1
- add Bs4FormRenderer HOT 1
- Add support for Nette 3 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forms.