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.
-
Can you elaborate about what modal exactly are you talking about?– Andris SevcenkoCommented Jul 17, 2014 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.– a-amCommented Jul 17, 2014 at 6:19
Add a comment
|
1 Answer
Ah, in that case you'll need to make your own ElementType. You should probably check out https://github.com/pixelandtonic/Events - 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: http://buildwithcraft.com/docs/plugins/working-with-elements#creating-new-element-types