This is an old revision of the document!
We will change the studynumber field from editable to non-editable, so you need to change a respondent details textbox.
First create your own respondent controller if you have not yet done so (see howto).
There is only one function you need to overrule: the addFormElements function.
First the parent class is used to create your form, then it gets the tab on which your element sits, and adds the same element again as Exhibitor element:
/** * Adds elements from the model to the bridge that creates the form. * * Overrule this function to add different elements to the browse table, without * having to recode the core table building code. * * @param MUtil_Model_FormBridge $bridge * @param MUtil_Model_ModelAbstract $model * @param array $data The data that will later be loaded into the form * @param optional boolean $new Form should be for a new element * @return void|array When an array of new values is return, these are used to update the $data array in the calling function */ protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, array $data, $new = false) { parent::addFormElements($bridge, $model, $data, $new); // show studynr non-editable $bridge->getTab('caption1'); $bridge->addExhibitor('gr2o_patient_nr'); }
This will replace the original element with the new layout.