This topic is locked

Hide Field based on Page Used

5/18/2020 2:52:39 PM
PHPRunner General questions
R
RBrogen author

Hi Everyone,
I have custom Order Add pages so that when a user creates a new order from a Client Page, it doesn't display the client name on the order form because you are already on that client. However, if you create an order from the Order list, the order form should display the client lookup field so the user can select the client they are creating the order for. What I want to do is when the page opens (Before Display) test to see which page is being loaded (page with client name) or (page without client name) and then hide that field. I can't seem to find out how to get the page name. Any thoughts on this would be greatly appreciated.
Thanks,

Randy

N
Nir Frumer 5/18/2020
R
RBrogen author 5/18/2020



hi Randy

check this

https://xlinesoft.com/phprunner/docs/hidefield.htm
hope it helps,


Thanks for the reply. I actually know how to hid the filed using the linked info ... the part I'm trying to figure out is how to determine what version of the page is being opened so I can create an If statement like this:
If page = pageWhereClientIsNotNeeded Then
hide field
else
don't hide field
end if

Sergey Kornilov admin 5/18/2020

$_GET["page"] will give you the name of the additional page that you are on right now. It will be empty if you are on the default page.

R
RBrogen author 5/19/2020



$_GET["page"] will give you the name of the additional page that you are on right now. It will be empty if you are on the default page.


I've tried $_GET["page"] in several locations and I always get the error $_GET not defined.