I am retrieving the options of the select box from the database. I want to limit the width of the option value in the drop down box.
Eg: The value in the data base is "ELEPHANT GROUP" In my drop down if i need only 8 characters long. The value to be displayed in the dropdown box is "ELEPHANT"
I want my option values to be limited to a particular size. Can any one help me in resolving this issue.?
My developer has a dynamic list box on one of his forms. ie: The Administrative user can create options which display in a Select Box for the General User to choose from. Our intention was for the Admin User to create options of about 50 characters max, but our business requirements do not allow us to restrict the size of the Option Name the Admin User creates. This leaves us open to the possibility of a SelectBox that is hundreds of characters wide, throwing all table formatting out the window and causing the screen to scroll horizontally. We've been arguing about this endlessly for days now, and apparently CANNOT limit the character input for the Option Name. Is there any way to manipulate the display of the Select Box to prevent it from exceeding a certain number of characters wide but still show very long Option Names?
Hope now u have got my problem exactly.. Please help me in resolving it.
You can do a
substring() to get the 8 firsts characters to show