Input Widgets for Read Only

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
DaveLClarkI
Experienced User
Posts: 165
Joined: Wed Dec 11, 2013 10:40 am
First Name: Dave
Last Name: Clark
Company Name: WinWholesale, Inc.
Phone: 937-294-5331
Address 1: 31101 Kettering Blvd.
City: Dayton
State / Province: Outside Canada/USA
Zip / Postal Code: 45439
Country: United States
Contact:

Input Widgets for Read Only

Post by DaveLClarkI »

I see for the text box that I can set the readonly attribute as needed to prevent input. But, I don't see the same thing for a select box. In that case, is my only choice the disabled attribute? Otherwise, in terms of a select box, I guess I'm about to find out what the styling choices are for the UL vs. PR display attributes which I previously used on the green screen...
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Input Widgets for Read Only

Post by David »

Correct -- a select box has no 'read only' property, only 'disabled', and that is the only way prevent the user from modifying it.

The 'disabled' property is more consistently available, I think the browser handles this on all types of input controls. And on our widgets that are not simply basic HTML elements, we also use the 'disabled' property, as opposed to read only. The only drawback about 'disabled' is that the browser goes and applies its own styling to certain types of controls, which you then have to adjust/revert through CSS.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests