![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
PFO Founder
![]() ![]() |
php/html: locking text box in a form
I was debating between putting this here or html but i will put it here anyway. Ok what im wondering is if there is away to lock specific text box with php or html depending on if the user has permision to edit specific parts of the form. I have a huge form with i would say around 90 textbox and what not that are filled out by one of the engineers at my company and but they will end up leaving some spots empty that the plant managers have to fill in but we dont want to give the plant managers he options of changing anything in the header like part number and all that stuff you know what i mean. I already have a user authentication system in place and i also have users in specified groups. Its just a matter of locking the certain fields so they cant be edited. Well thats my question if you need more info let me know i will be look for the answer on my own too so i will let you know if i find it or not before anyone replys
thanks
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#2 |
|
PFO Founder
![]() ![]() |
i figured out what i will do
i will add another php variable to the form and send read-only if they dont have permision to write to it but that will get to be alot of sending of variables so if someone has a better idea let me know ![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
You can set the editable attribute to false for the input tag. That should keep them from being able to edit it, of course javascript will allow them to disable this feature. Just make sure when the data is posted it only updates what they are allowed to change...
__________________
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Apr 2004
Location: Texas
Posts: 106
Rep Power: 5
![]() |
why not just remove the text box all together? ... if they have permission to edit ... display the textbox ... if they do not ... display the value as static text.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|