An element from system.xml
can have a dynamic comment. The comment can be rendered through a model.
You need to declare the comment field like this:
<comment>
<model>module/adminhtml_comment</model>
</comment>
Now you need to create the model with alias module/adminhtml_comment
:
<?php
class Namespace_Module_Model_Adminhtml_Comment{
public function getCommentText(){ //this method must exits. It returns the text for the comment
return "Some text here";
}
}
like following
<title translate="label">
<label>Title</label>
<comment>
<model>module/adminhtml_comment</model>
</comment>
<frontend_type>text</frontend_type>
<sort_order>3</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</title>
return value from the getCommentText
method