Thank you.
I have an other approach to this. I will make a plugin based on that.
rrd
2014-10-02 7:44 GMT+02:00 heavyKevy :
> I got the Autocomplete widget to work with the following:
>
> Same autocomplete widget file as you but different code in controller and
> view file:
> Controller:
> publi
I got the Autocomplete widget to work with the following:
Same autocomplete widget file as you but different code in controller and
view file:
Controller:
public $helpers = [
'Form' => [
'widgets' => [
'autocomplete' => ['App\View\Widget\Autocomplete']
Yes, you should have a form template called autocomplete which your widget
is using.
See
http://book.cakephp.org/3.0/en/core-libraries/helpers/form.html#customizing-the-templates-formhelper-uses
and
http://www.sanisoft.com/blog/2014/08/11/twitter-bootstrap-forms-cakephp-3/
Specifically Step 2
HTH
> Show us the from template for autocomplete
I do not have anything else. Should I?
Rrd
>
> T
>
> On Tue, Sep 30, 2014 at 7:59 PM, Radharadhya Dasa wrote:
>>
>> 1. /src/View/Widget/Autocomplete.php
>>
>> > namespace App\View\Widget;
>>
>> use Cake\View\Widget\WidgetInterface;
>> use Cake\View\F
Show us the from template for autocomplete
T
On Tue, Sep 30, 2014 at 7:59 PM, Radharadhya Dasa wrote:
> 1. /src/View/Widget/Autocomplete.php
>
> namespace App\View\Widget;
>
> use Cake\View\Widget\WidgetInterface;
> use Cake\View\Form\ContextInterface;
>
> class Autocomplete implements WidgetI
1. /src/View/Widget/Autocomplete.php
_templates = $templates;
}
public function render(array $data, ContextInterface $context) {
$data += [
'name' => '',
];
return $this->_templates->format('autocomplete', [
'name' => $data['name'],
I would have to see your code to understand what your are doing
On Tuesday, September 30, 2014 3:17:26 PM UTC+2, Radharadhya Dasa wrote:
>
> Thank you. Silly things sometimes hard to find...
>
> echo $this->Form->autocomplete('name');
>
> Now I do not have any error message but no code is generate
Thank you. Silly things sometimes hard to find...
echo $this->Form->autocomplete('name');
Now I do not have any error message but no code is generated the above code
do not echoes anyting. I am pretty sure that I missed something simple.
1. I created /src/View/Widget/Autocomplete.php
2. Added th
You are probably missing a "use *Cake\View\Form\ContextInterface*" at the
top of your file
On Tuesday, September 30, 2014 2:33:24 PM UTC+2, Radharadhya Dasa wrote:
>
> Hi,
>
> I am trying to make an autocomplete input work on Cake 3.0
>
> The current 3.0 cookbook gives a code example here :
> h
Hi,
I am trying to make an autocomplete input work on Cake 3.0
The current 3.0 cookbook gives a code example here :
http://book.cakephp.org/3.0/en/core-libraries/helpers/form.html
If I try it I get an error message:
*Fatal error*: Declaration of App\View\Widget\Autocomplete::render() must
be
10 matches
Mail list logo