AnsweredAssumed Answered

How to make a field editable in create view and non-editable in editview?

Question asked by GAUTAM GAUTAM on Aug 13, 2014
Latest reply on Aug 26, 2014 by Mukta Patel
i  want  field make read only for the particular condition When user create new record then  field is editable but user edit the record then  field make read only .

we have tried this code in Community Edition 6.5.17
but its not working..

File Path : custom/modules/Your_module_name/views/view.edit.php


class Custom<Your_Module_name>ViewEdit extends ViewEdit


function preDisplay()
    if($_REQUEST['record'] == "")
        $metadataFile = 'custom/modules/'.$this->module.'/metadata/editviewdefs.php';
        $metadataFile = 'custom/modules/'.$this->module.'/metadata/editviewdefs1.php';
    $this->ev = new EditView();
    $this->ev->view = 'EditView';
    $this->ev->ss =& $this->ss;
    $this->ev->setup($this->module, $this->bean, $metadataFile, 'include/EditView/EditView.tpl');


any help would be greatly appreciated...