You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is something that seems currently unimplemented. If there is a bunch of radio buttons, and a known value, how to bind the corresponding radio's checked attribute?
The text was updated successfully, but these errors were encountered:
Using the = character to bind a bool, depending on whether the "sex" bind property matches the given value.
<inputtype="radio" name="sex" value="male" data-bind:checked="sex=male" /><inputtype="radio" name="sex" value="female" data-bind:checked="sex=female" />
which could be further simplified to the following (due to the "value" attribute containing the value that we want to match to)
<inputtype="radio" name="sex" value="male" data-bind:checked="sex=@value" /><inputtype="radio" name="sex" value="female" data-bind:checked="sex=@value" />
and I suppose this could be even further simplified to
<inputtype="radio" name="sex" value="male" data-bind:checked="@name=@value" /><inputtype="radio" name="sex" value="female" data-bind:checked="@name=@value" />
but there's something funky about that syntax
$binder->bindData($person);
class Person {
publicfunction __construct(
publicreadonlystring$id,
publicreadonlystring$name,
publicreadonlyDateTime$dateOfBirth,
publicreadonlySex$sex,
} {}
}
EnumSex {
case male;
case female;
}
The idea here being that we already have this syntax:
This is something that seems currently unimplemented. If there is a bunch of radio buttons, and a known value, how to bind the corresponding radio's checked attribute?
The text was updated successfully, but these errors were encountered: