WebTextField.FieldType appears to do nothing at all

Setting the property in the IDE for Field Type, appears to be ignored at run time.

Attempting to set it in code is a bit of a mystery also. The following are resulting compiler errors:


What am I Missing?

FieldType takes a WebTextField.FieldTypes enumeration value. For example,

me.FieldType = WebTextField.FieldTypes.Email

1 Like

Thanks Tim. I can now work around the IDE ignoring the settings.

It’s important to remember that not all browsers support all types. Other than “password” the other types are mainly exposed on mobile devices by way of changing the keyboard in use.

1 Like

I think that information should be added to https://docs.xojo.com/WebTextField.FieldTypes without a note or something I expect the WebTextField to work just like this:

Thanks Greg that explains a lot

If for example I have a password field and I want to put a button that allows me to show or hide it, it does NOT work.

if txtAccesoClave.FieldType = WebTextField.FieldTypes.Password then
txtAccesoClave.FieldType = WebTextField.FieldTypes.Normal
txtAccesoClave.FieldType = WebTextField.FieldTypes.Password
end if

I have a FR already for this.