I am using the "Select Entry" field (_includes/forms/elementSelect.html) field in a custom plugin to select one of my custom element types.

In my ElementType, I defined defineTableAttributes() and getTableAttributeHtml() to customize the table cells on a index view of the Element.

Now when I am using this Element in a modal view, it displays the same cells as on the index view, but I would like to hide certain fields (like buttons).

Is there a way to customize the returned fields, without building the whole modal myself, like mentioned here?

I saw, that a attribute context gets passed, which is either modal or index, but I don't know how I could access it.


1 Answer 1


You should be able to accomplish what you want with a combination of the getTableAttributeHtml() hook and the modifyEntryTableAttributes() hook. You may be able to use the parameter $source from modifyEntryTableAttributes() to filter out index vs modal.

Check out this post for a more detailed description.

  • Okay thanks, I didn't knew 'index'/'modal' was a source actually
    – exophunk
    Commented Dec 3, 2015 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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