4

I created a custom form in admin using block(without UI component). So i want to get all columns of my custom table in form block file. Please suggest me.

1 Answer 1

7

Try this add New function in your custom resource model and call that function where you want to display.

public function getFields() { $fields = $this->getConnection()->describeTable($this->getMainTable()); return $fields; }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.