Jump to content

PageTable or Repeaters for a scorecard


patrickvibes
 Share

Recommended Posts

Hi Folks,

I am trying to setup a scorecard for a page for a golf course listing. Each course has different "Tees" i.e. Mens, Ladies - but also different tee colours like "Blue" or "Black" for championship, "White" for "Mens", "Green" for mens / non compeition and "Red" for ladies. This is fairly common but some courses might use gold, silver bronze as their colours.

Each Tee Box has the following data:

Distance

Par

Index

Men's boxes for par and index will typically always be Blue / Black and White - green is included for distance, and ladies tend to just have the one tee box.

I am trying to get my head around how to setup a field for this / approach it so I have the flexibility to do:

Hole Number (fixed 1-8)

Tees

 - Tee Colour

 - Tee Distance

 - Tee Par

 - Tee Index

I could probably figure some way to make "Hole" repeatable then the user has to enter repeatable rows under for each "Tee" however it's a bit messy and lot of repetition - it would be far better if there was a way to firstly define the courses "Tees (Colours)" then auto present 18 rows fields for the associated colours Par, Distance and Index.

I hope that makes sense and hope someone can guide me on an approach.

Thanks in advance.

Link to comment
Share on other sites

Correct me if I'm wrong, but it looks like you're mixing up front-end and back-end processwire cms stuff.

Are your visitors editing the scorecards in the backend/cms?

If so, make a front-end page with a form that has a pulldown menu for selecting the course, that way you can pre-fill the tees, colors and distances.

And don't bother how it looks in the backend, here you just provide all your course and tee data (and save the visitors scores)

If you wan't to organize all the course  backend options more compact (and with less overhead) have a look at Ryan's ProTable module http://processwire.com/api/modules/profields/table/

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

×
×
  • Create New...