Text field issue with "Required Field" validation

Hi Retool,

I have a text input field called "AddRentPlanDetailInvoiceID". I have the "Required field" turned on.

For this field, I have an Event Handler set so that upon Focus, it calls up a "GetInvoiceIDSequence" query and populates the field.

I also have the "Disable when true" condition set as: {{AddRentPlanDetailInvoiceID.value != null}}

Basically, the user clicks on the field, it queries the sequence from the database and populates the field, then disables the field so no additional changes can be made.

The problem is that from time to time, even though the field is populated with data, the exclamation mark still comes on stating "This field is required". This is somewhat confusing to the user.

I feel like there is some timing issue here where the "Required field" validation is performed before the field is disabled.

Any suggestions?

Thank you!

Why not just populate the field automatically instead of the using the user focus event?

Tess from Retool verified there was a bug with the component. Upgraded the deprecated component and all works well now.

Thanks Tess!

1 Like