Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 14th, 2005, 3:13 PM   #1
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
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.
big_k105 is online now   Reply With Quote
Old Jun 14th, 2005, 3:31 PM   #2
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
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.
big_k105 is online now   Reply With Quote
Old Jun 14th, 2005, 3:44 PM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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...
__________________

tempest is offline   Reply With Quote
Old Jun 14th, 2005, 4:59 PM   #4
sykkn
Hobbyist Programmer
 
Join Date: Apr 2004
Location: Texas
Posts: 106
Rep Power: 5 sykkn is on a distinguished road
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.
sykkn is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:44 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC