# |
Jul 20th 2017, 14:55 |
eBugg |
debug give this: '<div class="input number"><label for="OperacionVentaPrecioDirectoEuro">Precio Directo Euro</label><input name="data[OperacionVenta][precio_directo_euro]" step="0.000001" type="number" id="OperacionVentaPrecioDirectoEuro"/></div>' |
# |
Jul 20th 2017, 14:53 |
jeremyharris |
eBugg the reason I ask for debugging directly from the PHP template/view is to be certain nothing else is fiddling with it (like JS) |
# |
Jul 20th 2017, 14:53 |
eBugg |
this is a plain cakephp installation |
# |
Jul 20th 2017, 14:52 |
eBugg |
jeremyharris: let me try that. My only tools are vim and Firefox |
# |
Jul 20th 2017, 14:51 |
jeremyharris |
sorry, you’re using input. debug($this->Form->input(‘…’)) |
# |
Jul 20th 2017, 14:51 |
eBugg |
what would you put in the Form->control() ? the controller or the field ? |
# |
Jul 20th 2017, 14:51 |
jeremyharris |
eBugg okay. again, are you debugging directly from PHP or pasting from dev tools? also, have you checked for custom templates yet? |
# |
Jul 20th 2017, 14:50 |
eBugg |
jeremyharris: I have some js but nothing like .disabled |
# |
Jul 20th 2017, 14:50 |
admad |
adios |
# |
Jul 20th 2017, 14:49 |
admad |
the cake is a lie! |
# |
Jul 20th 2017, 14:49 |
jeremyharris |
fakephp? |
# |
Jul 20th 2017, 14:49 |
eBugg |
admad: what if it were FAKE cakephp ?? |
# |
Jul 20th 2017, 14:49 |
admad |
0wned! |
# |
Jul 20th 2017, 14:48 |
jeremyharris |
(I have no defense :P ) |
# |
Jul 20th 2017, 14:48 |
jeremyharris |
hey now |
# |
Jul 20th 2017, 14:48 |
admad |
if you are american it could be the russians |
# |
Jul 20th 2017, 14:48 |
jeremyharris |
better yet, debug($this->Form->control(‘…’)) to see exactly what it’s outputting |
# |
Jul 20th 2017, 14:47 |
jeremyharris |
and JS |
# |
Jul 20th 2017, 14:47 |
jeremyharris |
did you check your templates yet? |
# |
Jul 20th 2017, 14:47 |
eBugg |
as per code |
# |
Jul 20th 2017, 14:47 |
inoas |
urgh urgh |
# |
Jul 20th 2017, 14:47 |
inoas |
urgh now $viewVars['_serialize'] doesnt necessarily exist |
# |
Jul 20th 2017, 14:47 |
eBugg |
echo $this->Form->input('referencia', array('autofocus' => 'autofocus')); |
# |
Jul 20th 2017, 14:46 |
eBugg |
admad: it was a failed edited copy/paste |
# |
Jul 20th 2017, 14:46 |
shuyi |
you can just do $collection->addLast($x) |
# |
Jul 20th 2017, 14:46 |
jeremyharris |
this is certainly a mystery :P |
# |
Jul 20th 2017, 14:46 |
hmic |
inoas, just use + with arrays :p |
# |
Jul 20th 2017, 14:46 |
admad |
so you definitely have a custom helper |
# |
Jul 20th 2017, 14:46 |
shuyi |
i use laravel collection in cake, works like a charm |
# |
Jul 20th 2017, 14:45 |
admad |
autofocus="autofocus" also never gets added automatically |
# |
Jul 20th 2017, 14:45 |
jeremyharris |
is JS disabling it eBugg ? |
# |
Jul 20th 2017, 14:45 |
inoas |
I liked am in 1.x ;) |
# |
Jul 20th 2017, 14:45 |
eBugg |
I meant $this->Form->input('referencia'); |
# |
Jul 20th 2017, 14:45 |
inoas |
admad well array_merge/am is okay ... but array_push should just behave sane, or there should be one that does |
# |
Jul 20th 2017, 14:45 |
jeremyharris |
is that in the same form? do either of the controls receive custom templates? |
# |
Jul 20th 2017, 14:45 |
eBugg |
sorry |
# |
Jul 20th 2017, 14:45 |
jeremyharris |
eBugg the form helper wouldn’t automatically add “disabled” — at least not that I’ve ever seen |
# |
Jul 20th 2017, 14:45 |
eBugg |
like $this->Form->input('precio_directo_euro'); outputs: <input name="data[OperacionVenta][referencia]" autofocus="autofocus" maxlength="15" value="js-embalaje" id="OperacionVentaReferencia" required="required" type="text"> |
# |
Jul 20th 2017, 14:44 |
admad |
in 1.x we had am() as short for array_merge() :P |
# |
Jul 20th 2017, 14:44 |
inoas |
sometimes php makes me cry |
# |
Jul 20th 2017, 14:44 |
inoas |
sadly array_push works with references |