# |
Jun 28th 2017, 23:17 |
savant |
I looked up what the attribute needed to be |
# |
Jun 28th 2017, 23:16 |
savant |
thats just an html5 option |
# |
Jun 28th 2017, 23:11 |
aaronc |
I figured it would go somewhere in the options. Can you point me to where that is located in the manual per chance? |
# |
Jun 28th 2017, 23:10 |
savant |
that will fix the dom bit |
# |
Jun 28th 2017, 23:10 |
savant |
you can set `min => 0` |
# |
Jun 28th 2017, 23:10 |
savant |
in the options array for that form control |
# |
Jun 28th 2017, 23:09 |
slackebot |
I don't mean validation, as I can always check that, but I just don't want them to go into negative numbers in the first place, as it doesn't make sense from a UI perspective. Ideas? |
# |
Jun 28th 2017, 23:09 |
aaronc |
I have a question regarding forms that I can't seem to find in the documentation. I have a field in my form `echo $this->Form->control('radar_velocity');` Which due to my database configuration creates a input of type "number" in the DOM. It also has a perplexing attribute named "step" that is set to "any". The field currently allows users to click the up and down arrows into negative numbers. How do I set the range of what my form will allow |
# |
Jun 28th 2017, 23:04 |
aproapedelune |
you re right, this project was made last year, before red velvet |
# |
Jun 28th 2017, 23:03 |
savant |
you may wish to upgrade your cakephp/chronos version |
# |
Jun 28th 2017, 23:03 |
aproapedelune |
Warning (2): Declaration of Cake\Chronos\Traits\FrozenTimeTrait::setTime($hours, $minutes, $seconds = 0) should be compatible with DateTimeImmutable::setTime($hour, $minute, $second = NULL, $microseconds = NULL) [ROOT\vendor\cakephp\chronos\src\Date.php, line 24] |
# |
Jun 28th 2017, 23:02 |
aproapedelune |
Hey guys, how are you? I realised I probably won t be able to finish my project, so I started to take a look at my old cakephp project. |
# |
Jun 28th 2017, 21:05 |
saeideng |
`acl.ini ` |
# |
Jun 28th 2017, 21:03 |
saeideng |
https://github.com/dereuromark/cakephp-tools/blob/2.x/docs/TinyAuth/TinyAuth.md |
# |
Jun 28th 2017, 20:53 |
jarard |
what am I missing? |
# |
Jun 28th 2017, 20:53 |
jarard |
but my action re-directs me to login |
# |
Jun 28th 2017, 20:53 |
jarard |
I then created an allow.ini in the config folder |
# |
Jun 28th 2017, 20:52 |
jarard |
https://gist.github.com/spacebiscuit/0bcb21d4b53a6504cd96143990c2228e |
# |
Jun 28th 2017, 20:52 |
jarard |
Using TinyAuth for Cake 2.x, I have added the component in Apps controller as follows |
# |
Jun 28th 2017, 20:39 |
jfranger |
I have an entity EvaluationAnswerSet, that has many EvaluationAnswers, the answers map to questions that could be mandatory. I have a custom rule that determines whether all of the mandatory questions have been answered in the answer set. |
# |
Jun 28th 2017, 20:39 |
admad |
Table::checkRules() |
# |
Jun 28th 2017, 20:34 |
savant |
what are you trying to do |
# |
Jun 28th 2017, 20:34 |
jfranger |
Is it recommended to invoke the ruleschecker without trying to save an entity? |
# |
Jun 28th 2017, 19:18 |
gutts |
oh |
# |
Jun 28th 2017, 19:18 |
jeremyharris |
like ->combine(‘description’, function ($entity) { return $entity->childArray ?? ‘something else’; }); |
# |
Jun 28th 2017, 19:17 |
gutts |
so instead of ->combine('description', 'childArray'); pass 2 callbacks and return a dynamic value? |
# |
Jun 28th 2017, 19:16 |
gutts |
you mean a callback? |
# |
Jun 28th 2017, 19:16 |
jeremyharris |
gutts you can pass a callable as the argument, and check within that callable |
# |
Jun 28th 2017, 19:16 |
gutts |
so the optgroup label itself is selectable.. but with its own id |
# |
Jun 28th 2017, 19:16 |
gutts |
i want to ->combine('description', 'childArray') when 'childArray' is not empty. otherwise i want to nest the row under itself ( for an optgroup ) |
# |
Jun 28th 2017, 19:15 |
gutts |
how can I differentiate a combine() based on if a given property is a non empty array? |
# |
Jun 28th 2017, 19:06 |
chris-andre |
Yes, multiple rules will be triggered on the same field. If I post an empty organization number, both notEmpty() and customRuleMethod() is returned as an error in the entity. |
# |
Jun 28th 2017, 19:05 |
saeideng |
other rule for same validation not trigger |
# |
Jun 28th 2017, 19:04 |
saeideng |
if one of that return false |
# |
Jun 28th 2017, 19:04 |
chris-andre |
The case is; Either name or organization number has to have a valid value. If name is empty, then organization number has to have a valid value. If organization number is empty, then name has to have a value. |
# |
Jun 28th 2017, 19:04 |
saeideng |
probably |
# |
Jun 28th 2017, 19:03 |
chris-andre |
Yea. Or applied. If I add a notEmpty() rule to a field and then posts a empty field, then the custom rule is applied as well. |
# |
Jun 28th 2017, 19:01 |
saeideng |
name and organization_number ? |
# |
Jun 28th 2017, 19:01 |
saeideng |
? |
# |
Jun 28th 2017, 19:01 |
saeideng |
>My custom rule is only triggered if another rule is triggered |
# |
Jun 28th 2017, 18:58 |
chris-andre |
That didn't work @steinkel |