# Custom form handler error state

**URL:** <https://forum.builder.io/t/custom-form-handler-error-state/4892>\
**Category:** Technical Questions\
**Created:** [January 30, 2024, 3:13am UTC](https://forum.builder.io/t/custom-form-handler-error-state/4892 "2024-01-30T03:13:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khomenok](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/khomenok/32/3178_2.png) [@khomenok](https://forum.builder.io/u/khomenok)\
**Post date:** [January 30, 2024, 3:13am UTC](https://forum.builder.io/t/custom-form-handler-error-state/4892/1 "2024-01-30T03:13:33Z")

</div>

Hello!

I have a custom code handler for submitting a form. Could you help with a state variables that I should set to show form error / success manually?  
And is the state global or is it component based? Because, once I set the state inside the form, child components doesn’t seem to have it.

Thank you a lot!

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [February 20, 2024, 8:49am UTC](https://forum.builder.io/t/custom-form-handler-error-state/4892/2 "2024-02-20T08:49:35Z")

</div>

Hi @khomenok,

Builder state is a global variable within the content entry. One way to use builder [custom code](https://www.builder.io/c/docs/guides/custom-code) is well explained here [Builder form questions](https://forum.builder.io/t/builder-form-questions/2094)

Furthermore, I recommend you check out our forum post [Accessing builderState in custom components withChildren](https://forum.builder.io/t/accessing-builderstate-in-custom-components-withchildren/1884) and [How to access data from Builder in a React Custom Component](https://forum.builder.io/t/how-to-access-data-from-builder-in-a-react-custom-component/2618)

Hope this helps, let me know if you’ve further questions!
