Replace O into 0 using css

hi, i would like to replace O into 0 in a special field.
how can i do it using css?

Hi Ertan. Do you want to change that for display only? For example, are people inputting an O when it should be a zero, and you want to visibly change that? Or, do you want to store a zero for that input when the entry is submitted? Or are you looking for something else?

hi chris, no not only for displaying but also for saving in the form. my customers enter the vin (vehicle identification number) in the form. vin’s don’t include the letter “O”. they confuse 0 with O. i want O to be changed to 0 as soon they type in.

Hi Ertan. If you want to save it as a zero rather than an O, you will need to do something different. CSS would only change the display, and I don’t even think it’s possible to change a character with CSS. You would need to use jQuery for that.

How about if you use the gform_field_validation filter to return an error if they submitted an O and tell them to change that to a 0. Or, if you used gform_validation for VIN validation and returned a validation error if the VIN is invalid in any way? We have an example of how to do that here:

1 Like

thank you but this is not what i am looking for. is it possible to display O as 0 in admin menu?
if yes, how can i do it?

And what about using a input mask?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.