Need Help with Button Activation Based on Text Field Validation in FlutterFlow

Actions & Logic

Hello FlutterFlow Community,

I'm transitioning from React Native to FlutterFlow and need some assistance with form validation and button activation. I have a form with a phone number input field and a submit button. The button is initially disabled, and it should only be enabled when the user enters a valid phone number.

Here's my current setup:

  • I've added validation to the text field using formvalidation widget to check the format of the phone number.

  • The button is disabled until the user starts typing.

However, I'm facing an issue where the button remains active even if the entered phone number doesn't pass the validation. I want the button to be disabled if the validation fails.

Could anyone guide me on how to properly link the text field validation with the button's activation state? Any examples or guidance would be greatly appreciated!

Thanks in advance for your help!

What have you tried so far?

I've searched through the FlutterFlow community posts and watched tutorials by James no-code but haven't found a solution to this specific issue.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
11 replies