Jump to content

ReadOnly vs Enabled in form fields


Allen

Recommended Posts

Hi;

Could someone help me understand the differences between the use of Enabled or ReadOnly in forms as they appear to have the same effect?  From a UniGui perspective which is the preferred or correct way to go.

In my use case based on a users permissions fields my be editable or presented for informational purposes, so in my code I can toggle either property at the appropriate time.  My question is am I failing to understand the difference between the 2 properties?

Thanks for any insights into this.

-Allen

Link to comment
Share on other sites

42 minutes ago, Allen said:

My question is am I failing to understand the difference between the 2 properties?

Hello,

In general, here are the differences:

"Readonly element is just not editable, but gets sent when the according form submits.
Readonly elements can be focused (and getting focused when "tabbing" through a form).

Disabled element isn't editable and isn't sent on submit.
Disabled elements can't be focused (and getting focused when "tabbing" through a form)."

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...