lucky-media / formatic

3 stars 1 forks source link

Conditional field visibility broken with checkboxes #2

Closed jolora closed 6 months ago

jolora commented 6 months ago

I'm struggling to get a text field to show conditionally when another checkbox field has an option selected.

To reproduce the error please just take a look at your own demo and select "Other (please specify)" from the referral options. You'll see that your hidden "referrer_other" field remains hidden despite having x-if='Statamic.$conditions.showField({"if":{"referral":"contains other"}}, $data.dynamic_form)' assigned to its surrounding <template>

lokmanm commented 6 months ago

@jolora yeah this does sound like a bug. We will investigate this and release a fix ASAP.

Thanks for reporting it!

jolora commented 6 months ago

Thanks @lokmanm , no problem. Let me know please if you need a fix testing as I'd be keen to help in any way I can as this is a bug we only picked up just pre-launch of a project.

lokmanm commented 6 months ago

@jolora no worries, we will have someone take a look ASAP and I will let you know as soon as we release it!

lokmanm commented 6 months ago

Hey @jolora here is the commit that fixes this issue!

Let me know if you stumble upon anything else.

jolora commented 6 months ago

Lovely, works a treat! Thanks @lokmanm and @Afan417