# Can I create a variable to change to error state I created for input field

**URL:** <https://community.weweb.io/t/can-i-create-a-variable-to-change-to-error-state-i-created-for-input-field/1738>\
**Category:** How do I?\
**Created:** [January 22, 2023, 4:10pm UTC](https://community.weweb.io/t/can-i-create-a-variable-to-change-to-error-state-i-created-for-input-field/1738 "2023-01-22T16:10:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![carri](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@carri](https://community.weweb.io/u/carri)\
**Post date:** [January 22, 2023, 4:10pm UTC](https://community.weweb.io/t/can-i-create-a-variable-to-change-to-error-state-i-created-for-input-field/1738/1 "2023-01-22T16:10:42Z")

</div>

States are a challenge for me to trigger.

I want to change the border color on an input field if the field returns an error. B/c the border color has a bug and does allow it be set to a formula, I need to find a different way than using my error state color variable.

I set up an error state. Any suggestions on how to trigger this? Or is there a better way until the border color formula bug is fixed?
