UI Kit 2 TextField "onBlur"


Is there a way in UI Kit 2 to validate/update the value of a TextField in a Form when the user exits the field?

In my case, the input format of the field should be hh:mm, so if the user enters “1” I want it to change to 01:00 after the field is exited. I need to do this validation before the form is submitted.

If not possible in UI Kit 2, what other options do I have?


1 Like

Hi Niklas,
It’s possible to validate the value before the form is submitted, but I’m not sure it’s possible to update what is displayed in the field when using a Form. In this thread, I’ve responded with some sample code as an example of what is possible, TextField not responding to state change - as for updating what’s displayed in the Text Field in the Form, I’ve reached out to the Forge UI Team and will let you know.

1 Like

Thanks Mel!

For now I have “reverted” to Custom UI where I get the functionality I’m looking for. Missing “onBlur” (with state update) is the only thing preventing me from from using UI Kit 2 which I would much prefer. So please put it on the wishlist :slight_smile:


1 Like