That's very good solution when you don't need to populate the element value when the form is submitted.
It's equivalent solution is to use the Form Element method setAttrib()
and disable the form element
$formElement->setAttrib('disable','disable')
which will only freeze the element.
But if you need to populate the field, using the previous solutions you will probably need additional hidden field added, which will pass the value. Developing custom form element will be good style but that's not welcomed by each developer so you can use some tricky way to set a form element as a text only but populate its value. That way is when you create the element as a hidden field, set its value and use the Form Element method setDescription()
to set and display the element text value.
$formElement = new Zend_Form_Element_Hidden( 'elName',
array( 'label' => 'elLabel', 'value' => 'elValue' ) );
$formElement->setDescription( 'elValue' );
Then you can render that hidden element and display the value with the
$formElement->getDescription()
.