# |
Apr 25th 2017, 09:16 |
hagen00 |
yes, i know that for simple forms. not sure it will work for a complex form, with multiple associations... |
# |
Apr 25th 2017, 09:16 |
hagen00 |
hmm, but my array isn't populated from request->data. |
# |
Apr 25th 2017, 09:15 |
dereuromark |
you can also populate the entity and do form->create($entity) - will also work and is even cleaner |
# |
Apr 25th 2017, 09:15 |
dereuromark |
yes, and what I said is for displaying the selected value |
# |
Apr 25th 2017, 09:14 |
dereuromark |
but I wouldnt do this with magic numbers, use either string keys, or better like I do a enum kind of approach |
# |
Apr 25th 2017, 09:14 |
hagen00 |
i.e the form has been saved, now i want to display it again |
# |
Apr 25th 2017, 09:14 |
hagen00 |
i'm asking for display purposes. not saving purposes |
# |
Apr 25th 2017, 09:14 |
dereuromark |
it is really that easy |
# |
Apr 25th 2017, 09:14 |
dereuromark |
$this->request->data[gender] = number |
# |
Apr 25th 2017, 09:13 |
dereuromark |
if it is provided in the correct form |
# |
Apr 25th 2017, 09:13 |
hagen00 |
how do i set Feminime to checked? |
# |
Apr 25th 2017, 09:13 |
hagen00 |
so for example: $this->Form->radio('gender', ['Masculine','Feminine','Neuter']); |
# |
Apr 25th 2017, 09:13 |
dereuromark |
why? it reads the data |
# |
Apr 25th 2017, 09:13 |
hagen00 |
yes, i have the data. the data isn't the problem. the problem is the helper... |
# |
Apr 25th 2017, 09:13 |
dereuromark |
either from controller via request->data preset, or in view via default |
# |
Apr 25th 2017, 09:12 |
hagen00 |
https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-radio-buttons |
# |
Apr 25th 2017, 09:12 |
hagen00 |
Can anyone advise how to set a radio button to checked in a radio button list. The docs aren't clear on this. |
# |
Apr 25th 2017, 08:59 |
digitalfotografen |
Thanks for a great plugin!!! I use it for stuff where You probably should use a more "professional" queue handler. But nu keeping it inside Cake simplifies installations. |
# |
Apr 25th 2017, 08:56 |
dereuromark |
thx for the feedback guys, I tagged 3.4.0 |
# |
Apr 25th 2017, 08:55 |
digitalfotografen |
@dereuromark @birdy247 I have been using dev dev-master of Queue on CakePHP 3.3 and 3.4 for some time. It has been stable. I works great! |
# |
Apr 25th 2017, 08:45 |
ashish_onmobile |
@birdy247 |
# |
Apr 25th 2017, 08:45 |
ashish_onmobile |
let me know if it fit to your need. |
# |
Apr 25th 2017, 08:45 |
ashish_onmobile |
whatever table you want to use. |
# |
Apr 25th 2017, 08:45 |
ashish_onmobile |
try like this inside contain |
# |
Apr 25th 2017, 08:45 |
ashish_onmobile |
‘Users’ => function ($q) { |
# |
Apr 25th 2017, 08:43 |
birdy247 |
@dereuromark yes seems solid to me |
# |
Apr 25th 2017, 08:42 |
birdy247 |
but you can write a count inside a contain |
# |
Apr 25th 2017, 08:42 |
birdy247 |
I have done that |
# |
Apr 25th 2017, 08:40 |
ashish_onmobile |
let me know if i can help you. |
# |
Apr 25th 2017, 08:40 |
ashish_onmobile |
@birdy247 You have to write a query inside contain. |
# |
Apr 25th 2017, 08:33 |
crazycoder |
morning |
# |
Apr 25th 2017, 08:32 |
dereuromark |
oh right, I wanted to do that for quite some time. Do you think it is stable enough? All good? |
# |
Apr 25th 2017, 08:32 |
birdy247 |
Do you have a feeling of when dev-master will be tagged into a release? |
# |
Apr 25th 2017, 08:32 |
birdy247 |
but also 3.0.0 on another site |
# |
Apr 25th 2017, 08:31 |
birdy247 |
@dereuromark I am using your queue plugin on dev-master |
# |
Apr 25th 2017, 07:32 |
rchavik |
digitalfotografen yip |
# |
Apr 25th 2017, 07:27 |
birdy247 |
Or would I need to use some sepearte query for that? |
# |
Apr 25th 2017, 07:27 |
birdy247 |
Is it possible to do a count on a contain? |
# |
Apr 25th 2017, 07:26 |
digitalfotografen |
I am not a mysql guru ;) But it like acoount setup on mysql since it sais access denied. Then a humle recommendation, don't use mysql root account for production sites. Setup a dedicated mysql account with limited privileges |
# |
Apr 25th 2017, 07:23 |
rchavik |
it works on his dev machine, but not on his shared server |
# |
Apr 25th 2017, 07:22 |
rchavik |
here's his screenshot: https://vk.com/doc141967230_444277365 |