You cannot set it from the database.
You will have to code for it.
You can make use of the after_element_html feature that the form builder offers.
So declaring a field like this:
$fieldset->addField('identifier_here', 'type_here',
array(
'name' => 'name_here',
'label' => 'Label here',
'required' => true|false,
'after_element_html' => 'Some text after the element',
)
)
will make your text Some text after the element appear after the element. It can be anything, even some html or javascript.
But there is a catch. The product add/edit form is not built using code as shown above. You cannot control each field. The fields are generated based on the attributes.
But you have the event adminhtml_catalog_product_edit_prepare_form that is dispatched for every tab that contains product attributes.
You can try to observe it like this (untested code):
public function prepareEditForm($observer)
{
$form = $observer->getEvent()->getForm();
//let's say you want to add some message for the attribute with code `donation`
$donationElement = $form->getElement('donation');
if ($donationElement) {
$message = ...determine the string to display....
$donationElement->setAfterElementHtml($message);
}
return $this;
}
There is also an other approach. Each attribute supports a custom form renderer. This feature basically allows you to have the input be rendered using your own class and your own phtml file. This seams like a more complicated approach, but if you want to give it a try check this answer. It's for a different problem, but the approach is the same.
Manage Attribute, So may getafter_element_htmlattribute from there? – Charlie Jun 10 '15 at 12:13after_element_htmlfrom the db (unless you add a column to the table and implement that logic, but it won't be dynamic). You can use theadminhtml_catalog_product_edit_prepare_formevent as I explained. – Marius Jun 10 '15 at 12:30noteattribute instead ofsetAfterElementHtml.$donationElement->setNote($message);Thank You Marius. – Charlie Jun 11 '15 at 11:45