Component Registration: Testing if an input field is bound

I have a component that has three input fields:
AuthorId
AuthorName
AuthorHref

If authorId is populated or has a databinding i want to be able to use the showIf property of the register function to hide it. I can do it if a field is null but I can’t tell how to access the bindings array. Is there a syntax to do this?

Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.

Builder content link
e.g. Builder.io: Visual Development Platform

Builder public api key
go to Builder.io: Visual Development Platform and copy your PUBLIC api key

What are you trying to accomplish
e.g. I want to integrate builder on a landing page

Screenshots or video link
Screenshots of your issue, or even better a link to a video of what is happening or what you are trying to accomplish. We love using loom for that sort of thing

Code stack you are integrating Builder with
e.g. NextJS, react, Shopify

Reproducible code example
If you are having integration errors, please link to codesandbox or copy and paste your problematic code here. The more detail the better!

1 Like

Hello!

You should be able to accomplish this with the options argument available to the function you set for showIf on the input.

Please refer to our documentation here and this tutorial as well for additional details.