Sign up ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

I have been looking at the BaseElementFieldType.php file to try and understand how to use it for my own field type. How do I provide that field type with my own array of data to use? I believe it has to do with the sources,criteria, or elements but it is unclear to me.

share|improve this question
Can you elaborate about what modal exactly are you talking about? –  Andris Sevcenko Jul 17 '14 at 5:45
When using a the BaseElementFieldType it uses the elementSelect form elements. It is the input type assets uses or categories, or when selecting a relation. I am trying to incorporate that same input but using my own data to populate the modal window from which you can select content. –  aran Jul 17 '14 at 6:19

1 Answer 1

up vote 6 down vote accepted

Ah, in that case you'll need to make your own ElementType. You should probably check out - that's meant to be a simple ElementType to serve as an entry point while we get some documentation together.

Also, there are some videos to watch over here:

share|improve this answer
Thank you for pointing me in the right direction! –  aran Jul 17 '14 at 16:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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