Admin-only fields and plugin code

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 8, 2013   (RSS)

By pgplast - April 7, 2013

I am working a project for which I have written a series of plugins. After having tested the code for each, I later went on to set several fields referenced in the plugin code to "Admin-only" access.

Following this, my plugins return "undefined index" errors when they try to pull values from the fields, (e.g. $staller = $_REQUEST['staller'] returns an undefined index as though the field is not there).

I have gotten around this temporarily by hiding the fields by employing Chris' ShowHideFieldsForUsers, but am wondering if this is the behavior you designed. Can't we assign access privileges to a field in the backend but still reference those fields in our plugin code?

Thanks.

pgplast

By pgplast - April 8, 2013

Thanks, Greg.

Much appreciated!