<p>I believe you're looking for something like the example posted here which goes into detail on several items necessary to create a working Asset Relations Field in a custom plugin:
<a href="https://craftcms.stackexchange.com/a/456/115">https://craftcms.stackexchange.com/a/456/115</a></p>

CC BY-SA 3.0
2015-02-20T01:22:44.087Z
2015-02-20T01:22:44.087Z
2017-04-13T12:51:00.303Z
Ben Parizek
<p>I would like to create an elementSelect form field in my plugin, and can't find an example or description. Can someone help?</p>

CC BY-SA 3.0
2014-10-23T08:06:48.090Z
Do you already have a custom Element for your plugin set up and working?
Ben Parizek
CC BY-SA 3.0
2014-10-23T08:18:14.857Z
i have in my plugin folder templates/_fieldtypes/customers.html.

insert file:

{{ checkboxSelect({
    name: name,
    options: options,
    values: values,
}) }}
florian
CC BY-SA 3.0
2014-10-23T09:11:46.240Z
@florian Can you please update your question with more info? What’s the context here, and what “elementSelect” are you referring to? What have you already tried?
Brandon Kelly
CC BY-SA 3.0
2014-10-23T12:41:14.880Z
i want select some pdfs and files in my plugin.

The module looks like this:
http://buildwithcraft.com/docs/assets-fields
florian
<templating><plugin-development><elementtype>
How can I relate PDFs and Files using an Element Select field in my custom plugin?
# How can I relate PDFs and Files using an Element Select field in my custom plugin?

(Asked by: username_0 on 2014-10-23)

I would like to create an elementSelect form field in my plugin, and can't find an example or description. Can someone help?

**Tags:** templating, plugin-development, elementtype
> **Comments:**
> **username_1**: Do you already have a custom Element for your plugin set up and working?  
> **username_0**: i have in my plugin folder templates/_fieldtypes/customers.html.  insert file:  {{ checkboxSelect({     name: name,     options: options,     values: values, }) }}  
> **username_2**: @florian Can you please update your question with more info? What’s the context here, and what “elementSelect” are you referring to? What have you already tried?  
> **username_0**: i want select some pdfs and files in my plugin.  The module looks like this: http://buildwithcraft.com/docs/assets-fields  

---

## 1 answers

### Answer by username_1 on 2015-02-20. Score: 1

I believe you're looking for something like the example posted here which goes into detail on several items necessary to create a working Asset Relations Field in a custom plugin:
<https://craftcms.stackexchange.com/a/456/115>


---

