I have set dropdown in form.xml like
<argument name="data" xsi:type="array">
<item name="options" xsi:type="string">Book\Flip\Model\Category\Attribute\Source\Category</item>
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">text</item>
<item name="label" translate="true" xsi:type="string">category</item>
<item name="formElement" xsi:type="string">select</item>
<item name="source" xsi:type="string">flip</item>
<item name="sortOrder" xsi:type="number">20</item>
<item name="dataScope" xsi:type="string">category</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">false</item>
</item>
</item>
</argument>
and create model
namespace Book\Flip\Model\Category\Attribute\Source;
class Category extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
protected $_optionsData;
public function __construct(array $options)
{
$this->_optionsData = $options;
}
public function getAllOptions()
{
if ($this->_options === null) {
$this->_options = [
['value' => '1', 'label' => __('science')]
];
}
return $this->_options;
}
}
But in admin form it's shown a blank dropdown.