Auto Collapse Empty Custom Fields
Posted: 08 January 2007 05:44 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

What does this extension do?

- automatically hide Custom fields that are empty
- automatically show Custom fields that have data

This extension overrides the custom field’s “Show this field by default?” setting.

This version (1.1) works with Mark Huot’s custom field extensions, except for the Geo extension.
(I might add that later but I never really got that extension to work yet)

Download link.

EDIT: updated to version 1.1.1

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 02 May 2008 02:33 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  141
Joined  03-05-2008

Just found this.

Great!

Profile
 
 
Posted: 03 May 2008 03:12 AM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6617
Joined  04-15-2006

Inspired, simply inspired!! wink

Awesome add-on thankyou!! grin

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 08 May 2008 01:48 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  141
Joined  03-05-2008

Although I love this extension, it appears that there is a known issue with expanding and collapsing GoogleMaps divs, and I’m using Mark Huot’s geo plugin.

Expanding that CP field in Entry view results in a partial load of the Google Map. 

So, I can’t use this one. Sad face here.

Profile
 
 
Posted: 04 June 2008 10:02 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi Cocoaholic,

Auto Collapse Empty Custom Fields extension if used together with Required Category extension causes a javascript error.

To replicate this error you these steps are needed:
1) install Required category extension
2) set categories to be required for one particular weblog
3) try to post an entry to that weblog without assigning to a category.

Firebug shows this error

el_name has no properties
   
if (el_name.substring(0,8)=='field_id') {


It is the line from the script which Auto Collapse Empty Custom Fields extension injects:

//<![CDATA[
form_elements = document.getElementById('entryform').elements;
var
id_arr = new Array();
for(
i=0; i<form_elements.length; i++) {

el
= form_elements[i];
el_name = el.name;
toggle = 0;

if (
el_name.substring(0,8)=='field_id') {

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 June 2008 10:56 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

Hi Laisvunas,

The problem seems to be a combination of both extensions and Firefox!

1 - The Required Category extension shows the Error message using a <fieldset> tag (standard EE behaviour)
2 - The Auto Collapse extension loops through all form elements to fetch the name of each element (the fieldset doesn’t have one)
3 - Firefox treats a fieldset as a form element (which I am not sure it actually is). Safari for instance does not do this and works fine.

If you are on a Windows machine, could you quickly test if this also happens in IE?

I’m looking into a way to prevent the behaviour you are seeing.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 04 June 2008 11:20 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

Ok, I found a workaround here and updated the extension to version 1.1.1

Please download again and let me know if this works for you.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 04 June 2008 12:43 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi Elwin,

Just downloaded and installed updated version of Auto Collapse Empty Custom Fields extension, but Firebug still shows exactly the same error.

I have also checked with IE on Windows - also the same error.

P.S. Updated extension’s version number still is 1.1 build 20070108, so I’m not very sure I really tested updated version.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 June 2008 12:48 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

Well, must be a browse cache thing, I just downloaded it myself and it’s definitely version 1.1.1 build 20080604.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 04 June 2008 01:10 PM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi Elwin,

Just downloaded the true file, tested and found that everything works correctly.

Thank you very much for excellent extension and superfast debugging!

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 June 2008 01:52 PM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
Joined  04-12-2008

Perfect, thanks for clarifying this Elwin!

 Signature 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 04 June 2008 04:56 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Avatar
Rank
Total Posts:  83
Joined  04-03-2008

I think I know the answer, but ... is there any way to get this to work just on the Edit screen, and not the Publish one? I’d like all my custom fields open when I enter data; but once a entry is made, if a field is empty, I’d like it closed.

Thanks,
Nathan

Profile
 
 
Posted: 05 June 2008 02:04 AM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002
walpow - 04 June 2008 04:56 PM

is there any way to get this to work just on the Edit screen, and not the Publish one?

Sure Nathan, I don’t have time to make that a setting right now, but here is a quick version that does what you want.

Auto Collapse Edit version.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 05 June 2008 07:55 AM   [ Ignore ]   [ # 13 ]  
Grad Student
Avatar
Rank
Total Posts:  83
Joined  04-03-2008

Wow, that’s great. Just what I wanted.

Thanks a million,
Nathan

Profile
 
 
Posted: 12 November 2008 08:38 AM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  174
Joined  03-31-2002

Just found this, and wanted to say ‘Thanks’, Elwin. Great extension(s).

 Signature 

Les McKeown, President & CEO
Predictable Success®

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65102 Total Logged-in Users: 59
Total Topics: 82263 Total Anonymous Users: 24
Total Replies: 442106 Total Guests: 270
Total Posts: 524369    
Members ( View Memberlist )