rsanchez / entry_type

A dropdown fieldtype for ExpressionEngine 3 that shows/hides other fields on the publish page.
http://devot-ee.com/add-ons/entry-type/
47 stars 21 forks source link

Shouldn't hide non-Entry-Type fields #6

Closed struiling closed 13 years ago

struiling commented 13 years ago

Currently the plugin hides all custom fields, even ones that are not part of an Entry Type type. I'd like to be able to have some fields always visible, and then some show/hide with Entry Type.

jbrok commented 13 years ago

First of all, thanks for the free addon. Great.

+1 for this feature request. I'd like to use this addon to populate some fields in order to show the right custom fields (product attributes) for a specific product. An LCD TV has other attributes than a shoe, for example. But every product has a 'price' custom field, a 'brand' custom field, a 'product description' custom field, etc. So it would be nice to show some fields by default and populate other fields by selecting the entry type.

I would be paying to add an option that makes it possible for the clients to make their own 'field sets'. That would be awesome and a nice addition to CartThrob to simulate a Attributes Sets functionality, like Magento and any other eCommerce system.

rsanchez commented 13 years ago

Dudes, please download the develop branch: https://github.com/rsanchez/entry_type/tree/develop

I've made it so instead of choosing which fields to "show", you now choose which fields to "hide". So it doesn't hide all fields by default anymore. You guys wanna test this out?

jbrok commented 13 years ago

Tried to install it but it spits out some PHP-errors.

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: options

Filename: entry_type/ft.entry_type.php

Line Number: 101
A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: helpers/form_helper.php

Line Number: 324
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /usr/home/brokinte/www/dev.brokinterieur.nl/brok05/codeigniter/system/core/Exceptions.php:170)

Filename: core/Common.php

Line Number: 409

v2.1.4 build 20110411

rsanchez commented 13 years ago

Whoops. Just made another update to develop. Be sure to go and re-save your individual field settings for each entry type field you have after you install the new files.

jbrok commented 13 years ago

I'm getting the following error when I try to edit the custom field. Seeing only some unstyled forms.

Fatal error: Call to undefined function img() in /usr/home/brokinte/www/dev.brokinterieur.nl/brok05/expressionengine/third_party/entry_type/views/option_row.php on line 4
rsanchez commented 13 years ago

Ah, sorry. OK fixed that one too. Try again.