This topic is locked

Showing some fields read only during editing(Edit Page)

11/30/2008 9:15:11 AM
PHPRunner General questions
M
mengo author

Hi,

I'm trying to develop item tracking system. Thanks to Phprunner, I made good progress...

I have a problem with adding records by another user. Basically, my system should work like that:
User1 adds some of records when ships item. Remaining details should be added when item is received. So all records are in the same table(Table1). User1 doesn't see fields to be filled by user2 on Add page(User1 and user have different user rights). But user2 sees records on list page. User2 edits records through "Edit" page. User2 should see records from user1 as read only, but can not edit on Edit page.
So, how can I make some fields appear read only in Edit Page?

Or you may have suggestions regarding structure of system, that may help to do it easier.
Thank you in advance.

R
ringah 11/30/2008

Hi,

I'm trying to develop item tracking system. Thanks to Phprunner, I made good progress...

I have a problem with adding records by another user. Basically, my system should work like that:
User1 adds some of records when ships item. Remaining details should be added when item is received. So all records are in the same table(Table1). User1 doesn't see fields to be filled by user2 on Add page(User1 and user have different user rights). But user2 sees records on list page. User2 edits records through "Edit" page. User2 should see records from user1 as read only, but can not edit on Edit page.
So, how can I make some fields appear read only in Edit Page?

Or you may have suggestions regarding structure of system, that may help to do it easier.
Thank you in advance.


Hi - if you have a reasonably updated version of PHPR...
a) if you want to control all records regardless of which page, you should be able to do this if you have dynamic permissions enabled in misc/security tab - set to users can see others data but edit own data .. you may also need to add a field called owner to related tables..
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=35577&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' /> if it is only certain pages where some fields on the page need to be controlled you can right click in Visual editor and choose properties | view as | read only
c) otherwise will need some coding to change some fields to read only on some pages where current user is not record owner...sorry can't help with this..

J
Jane 12/1/2008

Hi,
I recommend you to create custom view on the Datasource tables and and divide permissions between main table and this view.

For example set up some field as readonly on the add page for custom view and add edit permissions for User2 only for this view.

M
mengo author 12/1/2008

Hi,

I recommend you to create custom view on the Datasource tables and and divide permissions between main table and this view.

For example set up some field as readonly on the add page for custom view and add edit permissions for User2 only for this view.


Jane,

Thank you for your suggestion.

Custom view solved most of my problem.
Thanks