Search form gives Component '' is not attached to ‘Nette\Application\UI\Presenter’
- rolandd
- Member | 3
Hello,
A newcomer to Nette here. I am trying to implement a search form, this form
is used across multiple presenters but as the title says I get the error
Component '' is not attached to 'Nette\Application\UI\Presenter'
.
I have followed the following pages:
- https://doc.nette.org/en/forms#…
- https://forum.nette.org/…-doing-wrong
- https://doc.nette.org/…s/form-reuse
What I have eventually implemented is this.
app/forms/SearchFormFactory.php
app/presenters/RulesPresenter.php
config.local.neon
This generates the given error, when I remove the link to the
SearchFormFactory
, the page loads fine.
Where o where am I going wrong?
Thank you for any insights.
- rolandd
- Member | 3
Hello @CZechBoY
Thank you for your quick reply and apologies for my late response. Life got in the way :)
So I have been following your pointers and here is what I have now. The searchFormFactory and translator are set in the parent. This gives me no error but I don't see the searchFormFactory form in the output either.
code
code
This is the neon file I am using.
You asked me to send you how I use this component. Not sure what you mean but here is what I plan to do. I want to show a list of rules and from this list the user can add or edit rules. Eventually these rules are used in the import and export of data. Before I get to those views, I must gather a lot more knowledge about Nette :)
Does this answer your question?