# |
Sep 4th 2019, 07:01 |
COOurb |
like we have regular fields that are scalar and make something like array of such fields under one name |
# |
Sep 4th 2019, 06:59 |
COOurb |
hey, is there any way to send (from form) several options in array/named array? |
# |
Sep 4th 2019, 06:59 |
javier.villanueva |
ty dudes |
# |
Sep 4th 2019, 06:59 |
javier.villanueva |
yes |
# |
Sep 4th 2019, 06:59 |
admad |
"optimal solutions" are always about effort vs reward, not what you run the fastest :slightly_smiling_face: |
# |
Sep 4th 2019, 06:58 |
javier.villanueva |
i keep that |
# |
Sep 4th 2019, 06:58 |
javier.villanueva |
ok |
# |
Sep 4th 2019, 06:57 |
admad |
even with 100 controllers there is hardly going to be enough bump in page load time to annoy the user |
# |
Sep 4th 2019, 06:57 |
admad |
if you want to split hairs about performance then retrieving from cache is gonna be faster then from db :slightly_smiling_face: |
# |
Sep 4th 2019, 06:56 |
admad |
no need to use db |
# |
Sep 4th 2019, 06:55 |
admad |
then format the results properly and cache it |
# |
Sep 4th 2019, 06:55 |
conehead |
@javier.villanueva Then you should not ask for an optimal solution :P Using reflection is imho probably easier and dirtier to implement. Notably faster probably not |
# |
Sep 4th 2019, 06:54 |
javier.villanueva |
ok |
# |
Sep 4th 2019, 06:54 |
javier.villanueva |
:upside_down_face: |
# |
Sep 4th 2019, 06:52 |
conehead |
:( |
# |
Sep 4th 2019, 06:52 |
admad |
oh it's for villa :P |
# |
Sep 4th 2019, 06:52 |
slackebot |
~tell conehead about premature |
# |
Sep 4th 2019, 06:52 |
slackebot |
Command sent from Slack by admad: |
# |
Sep 4th 2019, 06:51 |
admad |
kiwi_11: google "jquery dirtyforms" |
# |
Sep 4th 2019, 06:51 |
javier.villanueva |
Its not a problem really (in my case), because is a superadmin feature... I think in performance |
# |
Sep 4th 2019, 06:48 |
javier.villanueva |
thanks |
# |
Sep 4th 2019, 06:48 |
conehead |
I would strongly advise to save it to a database. As you might restrict yourself to add specific methods as you do not want to show them. |
# |
Sep 4th 2019, 06:41 |
javier.villanueva |
one question. (the most optimal solution). I want to show (in selects) all controllers, and their actions. Is it better to use Reflection each time or is it better to store in the database this info to access? |
# |
Sep 4th 2019, 05:42 |
kiwi_11 |
ea that would be better than dataloss |
# |
Sep 4th 2019, 05:42 |
kiwi_11 |
hi all, new to cakephp and have an app i am trying to figure out a fix for. have a form which is being entered into but if the user clicks away the form doesn't warn of data loss. is there a cake way of doing this or a autosave function? add and edit are through different links but if for instance the autosave then redirecterd to the edit ar |
# |
Sep 4th 2019, 04:57 |
javier.villanueva |
morning all |
# |
Sep 4th 2019, 04:56 |
javier.villanueva |
ty |
# |
Sep 4th 2019, 04:56 |
slackebot |
<javier.villanueva> |
# |
Sep 3rd 2019, 20:39 |
itmpls |
n/m, just did it with a notEmpty callback |
# |
Sep 3rd 2019, 19:01 |
itmpls |
->requirePresence('foo', function($context) { dd($context); }); never fires |
# |
Sep 3rd 2019, 19:00 |
itmpls |
and requirePresence's 2nd param as a function doesn't seem to work? |
# |
Sep 3rd 2019, 18:59 |
itmpls |
I don't think I . can rely on that? |
# |
Sep 3rd 2019, 18:59 |
itmpls |
since ->add requires the field to have a value |
# |
Sep 3rd 2019, 18:56 |
itmpls |
combining them? |
# |
Sep 3rd 2019, 18:56 |
itmpls |
+ not blank |
# |
Sep 3rd 2019, 18:55 |
itmpls |
what's the best way of doing a requirePresence with a condition in 3.7.x? |
# |
Sep 3rd 2019, 16:58 |
alexdd55976 |
@javier.villanueva contain + order by in contain + limit 1 in contain |
# |
Sep 3rd 2019, 16:41 |
javier.villanueva |
thanks |
# |
Sep 3rd 2019, 16:40 |
ndm |
@javier.villanueva For reference https://gist.github.com/ndm2/b417e3fa683a972e295dc0e24ef515e3 |
# |
Sep 3rd 2019, 16:40 |
ndm |
@villi |
# |
Sep 3rd 2019, 16:29 |
javier.villanueva |
ok |