Change field length

Hi All,
How to change field length in dialogue by code ???

what do you want to change? go to customize form and check field type

No, I want to add js code @LifeP

in customize form you can select the field and change type from data to other types which will change the form view also by default.

one field have alot of cases (if statement), I want to set length of field in many cases @LifeP

I want to change the field length property by coding not from customize form