How to set an element value depending on the page?

noname

New Member
Hi,
I have a list that contains an element called "page" (contains the page name where the record should be visible).
I want to allow a user group to add new record do the list without showing the "page" element in the form but forcing the value of the element ( "page") depending on the page where the record is added.

It's several day that I'm trying to find a solution without success, anyone can help me?
 
Hi Hugh, thanks for your answer.
I created a list that contains pdf and some information about it (is published, the page name where the pdf should be visible). Than in the website, in different pages, I added a module that show the pdf list filtered by the pages name). I hope this make the situation more clear. Thanks again.
 
I'm still not clear on what you mean by the "page name". Do you mean the URL?

You can set an element's default to pretty much anything. If you wanted the current page URI ...

Code:
return JURI::getInstance()->toString();

... and set "Eval" to yes.

-- hugh
 
The page name is only a name to identify where the pdf files should be visible (for istance I used "home" for the files that should be visible in the homepage.
In the mean time, I probably found a solution. I need to create a copy of the list, than in the new form I can set the default value that I need.

Thanks a lot for your time! Best regards
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top