This topic is locked
[SOLVED]

 More than one Add/Edit Page

7/15/2011 8:04:36 AM
PHPRunner General questions
I
imthebest author

Is this possible to create more than one Add and Edit page for the same table?
The requirement is that, I have to allow a category of user to add/update a particular set of fields in a table. While another category of users can add/update different set of fields in the same table.
Can this functionality be achieved some how?
Thanks in advance.

C
cgphp 7/15/2011

An add/edit page is enough. You have to hide or show fields based on logged user name: http://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm

I
imthebest author 7/22/2011

Hello cgphp
Thanks for the suggestion. It worked like charm on Add/Edit and View page.

But same codes are not hiding field on List page.
Is there any other way to hide /show field on List page based on user logged in?
Thanks in advance.

C
cgphp 7/22/2011

imthebest,
it works also for the List page. The event is "Before display", the same for edit and add page. Please, post the code.

I
imthebest author 7/22/2011

cgphp,
Below is the codes that I put on "Before Display" event of List Page.
$xt->assign("orgid_fieldblock",false);

$xt->assign("groupid_fieldblock",false);
Orgid and groupid are the fields in database. I put that simple codes to hide these fields from all users. I put the same codes in Add/Edit/View pages and it worked there. However, not working for List page.

C
cgphp 7/22/2011

Try this:

$xt->assign("orgid_fieldheadercolumn",false);

$xt->assign("orgid_fieldcolumn",false);

$xt->assign("groupid_fieldheadercolumn",false);

$xt->assign("groupid_fieldcolumn",false);
I
imthebest author 7/22/2011



Try this:

$xt->assign("orgid_fieldheadercolumn",false);

$xt->assign("orgid_fieldcolumn",false);

$xt->assign("groupid_fieldheadercolumn",false);

$xt->assign("groupid_fieldcolumn",false);



WOow!! This worked!! You are great cgphp... Thanks for your help... Do'nt have words to appreciate your help.

Many Thanks...
Is there any document/place, where I can refer to all the terminologies that can be used while doing phprunner specific programming,like "fieldheadercolumn, fieldcolumn, fieldblock etc.. I was not aware of these terms...

C
cgphp 7/22/2011

You have to look inside the html code in the visual editor