Building a Craft CMS Drop-down Field Type with Craft Commerce Data

We build a Craft field type from Craft Commerce data.

In the last cus­tom field type we did, we pop­u­lat­ed a Drop­down with sta­t­ic from an array of world lan­guages right in the method.

For this cus­tom field, we’ll do every­thing about the same as before, except this time, we’ll pop­u­late the drop­down with data from a Craft Com­merce service.

Let’s build this one a bit more quick­ly since we already know the basics of how it should work.

Craft Version
Craft 4
Instructor
Ryan Irelan
Level
Intermediate
Date Published
May 12, 2021
Ryan Irelan

I am the creator of CraftQuest, a web developer, and former software team manager. I spend most of my time improving CraftQuest with code and courses. When I'm not in front of the computer, I spend my time with my family, and running on the roads and trails of Austin, TX.