Jump to content

Fields for Lazy Developers


Joss
 Share

Recommended Posts

Okay, so we all like to think we are super organised when it comes to planning our ProcessWire site, but sometimes life is not like - we are uselessly lazy and can't even make our coffee in the right order (is is add the whisky first or second?).

So, here are a couple of really lazy ideas to make everyone feel better about messing up.

First Lazy idea

Oh, I forgot to create a field! (or two, or three....)

On the template edit page where you add the fields, how about a Create New Field button that allows you to create a field and add it to that template. Probably opens a modal window to create the field.

Second Lazy Idea

OH, why didn't I create the field BEFORE I created all these templates?

No Problemo! On the field Info tab where you can see which templates use the field, what about having another box that lists all the templates that do NOT use the field and are displayed in columns with little check boxes next to them - tick the boxes and save to add the field to those templates.

Third Lazy idea

Adding a group of fields to a group of templates.

I have actually just changed this from what I was going to suggest because my original idea was not lazy enough - far too much work for the user.

So, you get a new button at the bottom of your list of fields and a check box next to each field. Hit the check box and the button gives you the option to Add fields to Template. A modal opens where you can change the order of the fields and select which templates you want to add them to. In addition, you get the option to add them within a tab set or field set and give that a name.  Click Add and all those fields are added to the templates in the order you have set them.

(Note, if any of the fields have already been added to any of the templates, then it either does not add those fields and tells you which were not added to which templates, or it fails completely and tells you which were not and so on.)

Fourth Lazy Idea

Lazy blokes template creation with fields.

So, you suddenly realise you need 20 more templates with 18 existing fields each but you haven't got a handy dummy template with the right fields in. Don't panic. On the new template screen, simply select the fields you want, complete with tabs, field sets, and the right order, then choose the templates you want to create as normal and done!

Wow, that was lazy!

Fifth Lazy Idea

I can't remember what I am doing where, why and when!

So, this is a new screen under set up called something like Field Matrix. Basically it is a large, scrollable chart that has fields down the Left and templates across the top. 

From this chart you can now see which fields are being used on which templates shown by ticks and crosses.

PLUS!

You can actually add and remove fields from templates by clicking on their tick or cross to change it. THIS IS REALLY DANGEROUS (and probably a bad idea) but it is also wonderfully lazy!

Doesn't all that laziness feel good?

So there you go: Five lazy ideas to help tired, overworked, and disorganised web people get through their day,

Joss

(I know, far too many changes in one go - but I enjoyed thinking about them!)

  • Like 12
Link to comment
Share on other sites

This isn't real?

I just had a vision last night (after having a good smoke ;) ), where I was thinking about having a "Page Builder". Create a page, it will create a empty template. Now add or create fields to the page form and configure them on the fly. After some thinking, this would get though, as also now there's a "modal" option for tabs etc. And it may create problems with some fields etc. Throwed this in the backyard quickly.

Maybe on template level this might work little better. I'm thinking about having a template/field builder since 3 years now, it works fine in my head. :D

  • Like 2
Link to comment
Share on other sites

hahah- yes, as I said this is rather over the top.

It comes from me finishing off what is a rather over complicated site and suddenly realising I need an extra field added to ten templates. Not a huge problem, but then I thought, well, it could have been worse.

And if it was worse, how would I get round it easily

It kind of snowballed from there! :)

Link to comment
Share on other sites

I like the concept overall. Processwire is so suited to developers who do their own thing. Part of being flexible is having more than way to save time. Larger sites with multiple Templates and many Fields might benefit from these "lazy" ideas. 

Is there a way one could build a personal library of commonly used Fields (with titles, comments, etc) and then import them into other Processwire installations?

Link to comment
Share on other sites

Really like your first and second lazy ideas. Second one might work even better with something "less obtrusive", such as AsmSelect :)

Yeah, I ummed and ahhed over AsmSelect

Well, to be honest, I didn't think through any of these very hard, kind of just scribbled them down. It was only meant to be three originally...

I was trying to work out whether it is easier to look at a list and say "oh, I will have that one, and that one, and maybe those two over there..."

Or whether it is easier to select from a drop down..

Certainly, when adding multiple fields to multiple templates, then that is definitely a job for the usual system so you can change the order and so on.

Link to comment
Share on other sites

I like your fifth idea, the "Field Matrix". This is similar to a concept I've played with in my mind at the planning stages of a ProcessWire site, to work out what's needed and where.

I've never managed to do it in practice, though, because I tend to just simply have a nested bulleted list of the templates and fields instead (which ends up with a lot of repetition and nowhere near as visually comprehensive as a matrix!)

Additionally... while we're here...

Duplicate/clone this field/template

I feel like this section could do with two lazy-related additions to save clicks:

  1. a text box to enter the new name
  2. an option to go and edit the new field/template immediately
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...