<p>Is there any reason that what you're doing can't be accomplished using a Matrix field?</p>

<p>If the answer is "no, a Matrix field isn't sufficient", then you'll need to build a custom plugin to handle it. Assuming that this is the path that you are taking, you'll want to get familiar with this file:</p>

<blockquote>
  <p>/app/templates/_includes/forms.html</p>
</blockquote>

<p>These macros will help you to generate just about every field type that Craft has natively available.</p>

<hr>

<p>I built a plugin awhile back which puts a select dropdown menu inside of a table. The table macro is pre-rendered via PHP, turning it into a string. I then output that string directly into my actual page template.</p>

<p>To see exactly how I did it, check out <a href="https://github.com/lindseydiloreto/craft-phptweak/blob/master/phptweak/PhpTweakPlugin.php#L59" rel="nofollow">this example code...</a></p>

<p>This may not answer your question 100%, but hopefully it points you in the right direction.</p>

CC BY-SA 3.0
2014-07-11T08:06:00.840Z
Ok sadly in that list I cant find entriesField macro.
Moin Qidwai
CC BY-SA 3.0
2014-07-11T08:18:55.967Z
Entry fields are a bit more complex, since they will need to trigger a modal window. [I answered a question recently](http://craftcms.stackexchange.com/a/456/45) which described an Assets field, some parts of that will be very similar to your situation. You can adapt the answer there to work with Entries (instead of Assets). I'd suggest starting with the **template** portion of that answer, and working your way outwards from there.
Lindsey D
CC BY-SA 3.0
2014-07-11T07:41:51.577Z
2014-07-11T07:41:51.577Z
Lindsey D
<p>This question is from a long time ago, but nowadays there's a great 3rd-party plugin that lets you do this: <a href="https://github.com/engram-design/SuperTable" rel="nofollow noreferrer">https://github.com/engram-design/SuperTable</a></p>

CC BY-SA 3.0
2017-04-05T16:19:41.267Z
2017-04-05T16:19:41.267Z
Jordan Lev
<p>This was intentionally omitted from the table field.  For more complex data stores you should use Matrix. </p>

CC BY-SA 3.0
2014-07-11T09:39:08.610Z
I get that but you know clients can be a pain in the butt sometime and they want it in a tabular format in the admin panel.
Moin Qidwai
CC BY-SA 3.0
2014-07-11T14:36:49.400Z
In this case I would explain to the client the benefits of using Matrix over Tables. The work you'll sink into supporting entries in the Table field is probably going to be more significant than the discussion about using Matrix instead. Good luck!
Tyler Willingham
CC BY-SA 3.0
2014-07-11T09:24:36.900Z
2014-07-11T09:24:36.900Z
Tyler Willingham
<p>In Craft we have the table field type and each column can have a type. This field type is restricted to only text, number and checkboxes. Is there a plugin to add entries field type to the column types?</p>

<p>And if there isn't, can someone guide me to the proper files which I should look into to modify and add the field types myself by making a new plugin.</p>

<plugin-development><fieldtypes>
Plugin for entries table field
# Plugin for entries table field

(Asked by: username_0 on 2014-07-11)

In Craft we have the table field type and each column can have a type. This field type is restricted to only text, number and checkboxes. Is there a plugin to add entries field type to the column types?

And if there isn't, can someone guide me to the proper files which I should look into to modify and add the field types myself by making a new plugin.

**Tags:** plugin-development, fieldtypes

---

## 3 answers

### Answer by username_1 on 2014-07-11. Score: 2 | Accepted answer

Is there any reason that what you're doing can't be accomplished using a Matrix field?

If the answer is "no, a Matrix field isn't sufficient", then you'll need to build a custom plugin to handle it. Assuming that this is the path that you are taking, you'll want to get familiar with this file:

> /app/templates/\_includes/forms.html

These macros will help you to generate just about every field type that Craft has natively available.

---

I built a plugin awhile back which puts a select dropdown menu inside of a table. The table macro is pre-rendered via PHP, turning it into a string. I then output that string directly into my actual page template.

To see exactly how I did it, check out [this example code...](https://github.com/lindseydiloreto/craft-phptweak/blob/master/phptweak/PhpTweakPlugin.php#L59)

This may not answer your question 100%, but hopefully it points you in the right direction.

> **Comments:**
> **username_0**: Ok sadly in that list I cant find entriesField macro.  
> **username_1**: Entry fields are a bit more complex, since they will need to trigger a modal window. [I answered a question recently](http://craftcms.stackexchange.com/a/456/45) which described an Assets field, some parts of that will be very similar to your situation. You can adapt the answer there to work with Entries (instead of Assets). I'd suggest starting with the **template** portion of that answer, and working your way outwards from there.  

---

### Answer by username_2 on 2017-04-05. Score: 3

This question is from a long time ago, but nowadays there's a great 3rd-party plugin that lets you do this: <https://github.com/engram-design/SuperTable>


---

### Answer by username_3 on 2014-07-11. Score: 2

This was intentionally omitted from the table field. For more complex data stores you should use Matrix.

> **Comments:**
> **username_0**: I get that but you know clients can be a pain in the butt sometime and they want it in a tabular format in the admin panel.  
> **username_3**: In this case I would explain to the client the benefits of using Matrix over Tables. The work you'll sink into supporting entries in the Table field is probably going to be more significant than the discussion about using Matrix instead. Good luck!  

---

