Log message #4201451

# At Username Text
# 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
# Sep 3rd 2019, 16:28 dereuromark first can mean a lot of things, in terms of order. if you want to keep things simple get them all and then take the first
# Sep 3rd 2019, 16:26 javier.villanueva There are a direct way?
# Sep 3rd 2019, 16:26 javier.villanueva I know that if I use $this->Articles->find('all')->contain('Tags'). I have an array with them, but I want only first
# Sep 3rd 2019, 16:25 javier.villanueva can I get first of belongsToMany? for example Articles + Tags (HABTM) . I have an article id, and I want the first tag. (with find)
# Sep 3rd 2019, 15:34 neon1024 Perhaps I will make that coffee I’ve been putting off
# Sep 3rd 2019, 15:32 neon1024 Perhaps I should read the docs more! :face_palm:
# Sep 3rd 2019, 15:32 ricksaccous ;)
# Sep 3rd 2019, 15:32 ricksaccous nice
# Sep 3rd 2019, 15:32 ricksaccous but if that works why not
# Sep 3rd 2019, 15:32 neon1024 It’s done now
# Sep 3rd 2019, 15:32 ricksaccous lol
# Sep 3rd 2019, 15:32 ricksaccous you don't necessarily need to customize template
# Sep 3rd 2019, 15:31 ricksaccous under the form key
# Sep 3rd 2019, 15:31 slackebot <neon1024>
# Sep 3rd 2019, 15:31 ricksaccous oh it can take form options
# Sep 3rd 2019, 15:31 neon1024 https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-post-buttons
# Sep 3rd 2019, 15:31 ricksaccous i totally forgot that existed
# Sep 3rd 2019, 15:31 ricksaccous ohhhh
# Sep 3rd 2019, 15:30 neon1024 There is no Form->create
# Sep 3rd 2019, 15:30 neon1024 Because @ricksaccous `postButton` is a single call
# Sep 3rd 2019, 15:30 neon1024 Classes will be applied to the `<button>` tag not the `<form>` tag, which is `display:block` in my application
# Sep 3rd 2019, 15:30 ricksaccous why wouldn't you just add a class in form->create
# Sep 3rd 2019, 15:29 ricksaccous that works too
# Sep 3rd 2019, 15:29 neon1024 Either way `postButton` doesn’t have an option to change the wrapping `<form>` tag
# Sep 3rd 2019, 15:29 ricksaccous oh
# Sep 3rd 2019, 15:29 ricksaccous but yep
# Sep 3rd 2019, 15:29 ricksaccous float-right, whatever you guys are saying, etc, with floats you just have to be careful about clearfixing
# Sep 3rd 2019, 15:29 neon1024 https://getbootstrap.com/docs/4.3/components/forms/#inline-forms
# Sep 3rd 2019, 15:29 ricksaccous you have multiple options
# Sep 3rd 2019, 15:28 alexdd55976 oh
# Sep 3rd 2019, 15:28 alexdd55976 `class => "right"`
# Sep 3rd 2019, 15:28 neon1024 Yes `inline`
# Sep 3rd 2019, 15:28 alexdd55976 i meant css class
# Sep 3rd 2019, 15:27 neon1024 There is for Form::create
# Sep 3rd 2019, 15:27 alexdd55976 wasn't there a class for that?