Wednesday, 7 August 2013

Keep form fields from being editable

Keep form fields from being editable

I have a form that's pre-populated with values from a database. If a user
is logged in and has sufficient permissions, the user can edit the fields.
That all works well; however, if the user is not logged in, the fields
should not be able to be changed. I have it so that any changes the bad
user makes won't save to the database, but I'd like to make it so that the
user can't even click into those fields.
Is there a way to conditionally allow form fields to be clickable?

No comments:

Post a Comment