# Error: Binding expression cannot be assigned to

**URL:** https://discourse.aurelia.io/t/error-binding-expression-cannot-be-assigned-to/4069
**Category:** Help Requests
**Created:** [February 28, 2021, 8:03pm UTC](https://discourse.aurelia.io/t/error-binding-expression-cannot-be-assigned-to/4069 "2021-02-28T20:03:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rhysshadow](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/rhysshadow/32/1959_2.png) [@rhysshadow](https://discourse.aurelia.io/u/rhysshadow)
#### Post date: [February 28, 2021, 8:03pm UTC](https://discourse.aurelia.io/t/error-binding-expression-cannot-be-assigned-to/4069/1 "2021-02-28T20:03:15Z")

</div>

I am loading up a form filled with checkboxes, and I want to dynamically set a checkbox based on the value from the config array that I am getting back from a perl script.

If I use the following code, it correctly sets the checkbox as on or off, but when I try to click on it, I get an error.

html code:

```auto
<input type="checkbox" 
name="include_consolidations"
id="include_consolidations"
checked.bind="(sprxInfo.include_consolidations == 'on')">

```

Error:

```auto
Error: Binding expression "sprxInfo.include_consolidations=='on'" cannot be assigned to.

```

I have tried using `value.bind` and that does not properly set the checked property on the checkbox.

Is there some feature of bind that I’m missing? I thought I would be able to use an expression in `checked.bind`.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![ormasoftchile](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/ormasoftchile/32/340_2.png) [@ormasoftchile](https://discourse.aurelia.io/u/ormasoftchile)
#### Post date: [February 28, 2021, 8:48pm UTC](https://discourse.aurelia.io/t/error-binding-expression-cannot-be-assigned-to/4069/2 "2021-02-28T20:48:21Z")

</div>

If you use an expression, it becomes readonly, because it is the result of the evaluation. This goes against the two-way binding nature of checked.bind.  
So, you need to bind to a property which can be read and written.  
Regards.
