like the title said how do i truncate an auto-binding input to 19 when num of char is > 22
I want it to look like this
like the title said how do i truncate an auto-binding input to 19 when num of char is > 22
I want it to look like this
Can’t you just limit the number of characters for the input element?
what if the user has really long name or long company name etc. im just preparing for the worst case. Also if i do that i limit the user freedom
Use a backend database trigger with this condition.
This would be my approach as well. A trigger allows you to validate changes after a record is modified/created/deleted (among other use cases)
Ar you asking how to truncate the input value?
Or just the display of it?
sorry for the late response. It’s for display
In that case, just do exactly as you said in your post…
i.e. truncate it to 19 characters if the character length is more than 22