I'm developing my own component for Joomla but I'm beginner in PHP and don't know how to get the names of parents. I have the table #__records (for example):
id name parent 1 ChildName 2 2 ParentName1 0 3 ParentName2 0
and I have the field name="parent" type="list" at admin.../models/forms/record.xml. If I open the record "ChildName" at back-end for editing I see the drop-down list for choosing parent but it's empty. I need to get the names of parents i.e. "ParentName1, ParentName2" at this list. What do I need to write in admin.../models/record.php at function getItem() or somewhere else ?