Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Search and NOEDIT
Search and NOEDIT [message #1121] Thu, 04 October 2007 11:37 Go to next message
danpoleary is currently offline  danpoleary
Messages: 49
Registered: February 2007
Member
Hi,

How do I allow a search on a field that has NOEDIT selected, I thought that only setting NOSEARCH would block searches.

Would I need to make all fields editable and then override that when update has been selected to protect fields?

Thanks,

Dan
Re: Search and NOEDIT [message #1122 is a reply to message #1121] Thu, 04 October 2007 12:14 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
NOEDIT applies to every screen, NOSEARCH only applies to a search screen.

You can change the settings for any field at any time to override what was declared in the Data Dictionary. The best place is in the _cm_changeConfig() method, as in the following example:
    function _cm_changeConfig ($where, $fieldarray)
    {
        if ($GLOBALS['mode'] == 'search') {
            unset($this->fieldspec['field1']['noedit']);
        } // if

        return $fieldarray;

    } // _cm_changeConfig

You can also add a setting instead of clearing it, as in:
    $this->fieldspec['field1']['nodisplay'] = 'y';
    $this->fieldspec['field2']['nosearch'] = 'y';
    $this->fieldspec['field3']['noedit'] = 'y';


Previous Topic: _cm_post_getData
Next Topic: multi3
Goto Forum:
  


Current Time: Fri Apr 19 23:11:54 EDT 2024

Total time taken to generate the page: 0.00830 seconds