Robin S Posted November 5, 2018 Share Posted November 5, 2018 Minimal Fieldset Adds a config option to Fieldset/FieldsetGroup/FieldsetPage to render the fieldset without label or padding in Page Edit. When a neighbouring field in the same row is taller than the fieldset the extra height is distributed evenly among rows within the fieldset. Requires ProcessWire v3 and AdminThemeUikit. Why? This module allows you to create layouts in Page Edit that would not be possible without it. It's useful when you want a layout that has two or more fields as rows that are themselves within a row in Page Edit. It's also useful when you have some fields that you want to add to a template as a group (i.e. via FieldsetGroup or FieldsetPage) but having a heading and visible wrapper for the fieldset in Page Edit would be redundant. Example: Installation Install the Minimal Fieldset module. Usage In the field settings for any Fieldset/FieldsetGroup/FieldsetPage, tick the "Remove label and padding for this fieldset" checkbox. https://github.com/Toutouwai/MinimalFieldsethttps://modules.processwire.com/modules/minimal-fieldset/ 24 2 Link to comment Share on other sites More sharing options...
horst Posted November 5, 2018 Share Posted November 5, 2018 very nice! ? 1 Link to comment Share on other sites More sharing options...
Klenkes Posted November 6, 2018 Share Posted November 6, 2018 This is really great. In order to make editing easy for users I spend a lot of time grouping and arranging fields in the backend. I definitely will use it! Link to comment Share on other sites More sharing options...
arjen Posted November 6, 2018 Share Posted November 6, 2018 Thanks! Really nice. Link to comment Share on other sites More sharing options...
Klenkes Posted November 6, 2018 Share Posted November 6, 2018 11 hours ago, Robin S said: Requires ProcessWire v3 and AdminThemeUikit. I was happy too early... AdminThemeUikit required. I am still a Renoman... Link to comment Share on other sites More sharing options...
dotnetic Posted November 6, 2018 Share Posted November 6, 2018 12 hours ago, Klenkes said: I am still a Renoman Upgrade then ? Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted November 17, 2018 Share Posted November 17, 2018 Wonderful! Well done and thank you for taking the time and releasing this. I've been thinking about the exact same thing for a while now. Could you make the vertical spacing optional, via another checkbox maybe? I have quite a few layouts where the secondary column has a lot fewer inputs and would prefer to have them on top. Link to comment Share on other sites More sharing options...
Robin S Posted November 18, 2018 Author Share Posted November 18, 2018 2 hours ago, d'Hinnisdaël said: Well done and thank you for taking the time and releasing this. Glad you like it. ? 2 hours ago, d'Hinnisdaël said: Could you make the vertical spacing optional, via another checkbox maybe? Done, in v0.1.1. 5 Link to comment Share on other sites More sharing options...
matjazp Posted November 18, 2018 Share Posted November 18, 2018 Thanks for the module. Maybe this could be in the core... Any chance of supporting AdminThemeDefault? If not, then you could possibly check if the user has Uikit theme active before injecting css file and applying classes? 2 Link to comment Share on other sites More sharing options...
Robin S Posted November 18, 2018 Author Share Posted November 18, 2018 34 minutes ago, matjazp said: Any chance of supporting AdminThemeDefault? No, AdminThemeDefault and AdminThemeReno do some crazy JS spacer stuff to equalise field heights. This module relies on the flex layout used in AdminThemeUikit. 34 minutes ago, matjazp said: If not, then you could possibly check if the user has Uikit theme active before injecting css file and applying classes? Possibly, but not sure what the point of that would be. The module already requires AdminThemeUikit in order to be installed and also clearly states that in the readme. And if you have AdminThemeUikit installed but you allow some users to choose a different theme then using this module is not going to be a good idea. Best just not to install it in that case. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 18, 2018 Author Share Posted November 18, 2018 In v0.1.2 I've added some warning notices in case AdminThemeUikit is installed but not in use. Link to comment Share on other sites More sharing options...
d'Hinnisdaël Posted November 18, 2018 Share Posted November 18, 2018 Field exports don't seem to work properly with the module enabled. When exporting a Fieldset (via Setup » Fields » Export), I get the following error: Call to a member function add() on null (MinimalFieldset.module, line 74). $wrapper seems to be unset in this specific context. Uninstalling the module gets rid of the exception. Could you check if you see the same thing (I'm on 3.0.117) or if I just have something misconfigured? 2 Link to comment Share on other sites More sharing options...
Robin S Posted November 18, 2018 Author Share Posted November 18, 2018 @d'Hinnisdaël, thanks for the report. FieldsetClose needed to be excluded - fixed in v0.1.3. 2 1 Link to comment Share on other sites More sharing options...
eelkenet Posted November 27, 2018 Share Posted November 27, 2018 I installed the module (v0.1.3) on an existing site, running PW in the current Master release, v3.0.98 on Php 7.2. After enabling the module for a regular Fieldset (Open) I kept running into this error: Method InputfieldFieldsetOpen::wrapClass does not exist or is not callable in this context This is because Inputfield::wrapClass() has not been added to the Master yet, it is only available on the ProcessWire dev release (currently 3.0.119). The fix for this issue is to replace lines 107-109 with: // Add classes to inputfield $inputfield->wrapClass .= ' MinimalFieldset'; if(!$field->no_spacing) $inputfield->wrapClass .= ' MinimalFieldsetSpaced'; 2 Link to comment Share on other sites More sharing options...
Robin S Posted November 27, 2018 Author Share Posted November 27, 2018 Thanks @eelkenet, fixed in v0.1.4. 2 Link to comment Share on other sites More sharing options...
cjx2240 Posted November 19, 2020 Share Posted November 19, 2020 I just want to say I love this module. It means I can have repeatermatrices made up of fieldsets, while also using those fieldsets on their own elsewhere, with much less clutter. Thanks for making it! Would it not make more sense though for the provided option to be added to Input > Admin theme settings (Uikit) ? Then also it could be overriden from within a template/repeater field group. I think this would be really helpful because while you're likely to not want the title/padding when loading a fieldset within a repeater matrix, you're likely to want it when loading a fieldset in a more standard context. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2020 Author Share Posted November 20, 2020 12 hours ago, cjx2240 said: I just want to say I love this module. Thanks, I'm glad you like it. ? 12 hours ago, cjx2240 said: Would it not make more sense though for the provided option to be added to Input > Admin theme settings (Uikit) ? Then also it could be overriden from within a template/repeater field group. The "Admin theme settings (Uikit)" options don't exist for the standard Fieldset fieldtype (FieldsetOpen) so that wouldn't work, and in any case the location of the module settings fields doesn't determine whether or not they can appear in template context. But in the newly released v0.1.6 I have added support for defining the Minimal Fieldset settings in template context so this should cover what you're wanting to do. 5 Link to comment Share on other sites More sharing options...
cst989 Posted September 2, 2021 Share Posted September 2, 2021 Just fyi this breaks a bit if you put a description for the fieldset and also tick the box. Maybe just in the latest version of PW 1 Link to comment Share on other sites More sharing options...
Robin S Posted September 2, 2021 Author Share Posted September 2, 2021 12 hours ago, cst989 said: Just fyi this breaks a bit if you put a description for the fieldset and also tick the box. Maybe just in the latest version of PW Thanks. I assume you mean if you accidentally add a description because the point of this module is that it hides the fieldset that surrounds the fields so you wouldn't expect to be able to see any description. In v0.1.7 the module explicitly hides any description and notes for the fieldset so if these are accidentally present they won't disrupt the intended layout. 2 1 Link to comment Share on other sites More sharing options...
cst989 Posted September 20, 2021 Share Posted September 20, 2021 Sorry I should've been clearer, what I was seeing was that the description was still visible, but the padding broke and spacing at the bottom of the fieldset was out of alignment. The way I'm trying to use minimal fieldset is like this: For me, a description would still be kinda handy to have - but I appreciate it would need new CSS logic and that's more complicated than it seems. And I understand if this isn't exactly the aim of the module. 0.1.7 certainly fixes the visual hiccup pictured, so thanks for that ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now