Multi Section Editor with List Options from another

10 posts by 3 authors in: Forums > CMS Builder
Last Post: October 29, 2012   (RSS)

By Rusty - October 26, 2012 - edited: October 26, 2012

Hey guys, trying to do something a bit different here and I could use a hand getting it working.

I'm attempting to create a Multi Section that has list options populated from another Multi Section. And while I know a CMSB help/walkthrough has been covered for almost the same thing my implementation hasn't yet worked. And I believe it has to do with how I'm wanting to use that second Multi Section.

Overview of what I'm doing with the Membership Plugin:

User has two options:
Job Seeker
Job Lister (Company)

I want to set it up so that a Company can have multiple Jobs, and then also that Job can have multiple positions and each position a quantity.

So in terms of Multi Section editor population it is something like this.

A user (with the option of Company set in the User Accounts editor) can create
---a Job (in the Jobs Multi Section Editor)
---This Job will have a list of positions filled from another Multi Section Editor (which only contains a Position list and a Quantity list)
utsi
I would like within the CMS to be able for a user that's signed in as a Company to be able to create a Job Listing that pulls the position titles list from the other section editor and presents it as check boxes with an accompanying quantity drop down next to it.


However as I've typed this and thought about this out loud it it seems more and more like something that can be accomplished, however only outside of CMSB. EG: it can be done in php, with CMSB, but not actually done from within the confines of CMSB itself (like actually using the CMSB Section Editor).

The reason I want to do it this way is so that I can easily attribute for a User all the Jobs they have (via a list) and then also collectively for a User all the Positions and Number of Positions (eg: 5 entry level, 2 mid level, 1 management).

And of all the times in the past when I just hammered my way through things and finally got it/a way around it, the time I would just rather pay to have it fixed and done my server is down... Sadface :(
Rusty

Re: [Rusty] Multi Section Editor with List Options from another

By gkornbluth - October 26, 2012

Hi Rusty,

If I understand what you're trying to do, you can set up your multi-record jobs and positions editors with only one text field each, and then, in your job listing editor, set up the list fields using the advanced options > get options from database. Then choose either the Jobs or Positions editor and pull your option values from the num (record number) field and your option labels from the title field.

Note that since you're pulling the information for the option value from a numerical list field, to display the option label on your page, you'll need to use the pseudo field :label to display your actual job or position like this: echo $record['your_field:label']

Hope that answers at least some of your issue.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Multi Section Editor with List Options from another

By Rusty - October 26, 2012 - edited: October 26, 2012

Well that kind of worked.

While I was thinking of a another way to put it I came up with this.

The same way we have a Multi Section Editor where we create a schema for each record that will be created under that section editor, I want to also embed the ability (within CMSB) to setup another sub-section editor. So that within CMSB a company could add multiple jobs and specify the quantity for each. EG:

Company is logged in, goes to Job Section Editor, the fill out the info for that particular job site, and then could click "Add Job" (which I think would require a custom plugin/unique CMSB modding) or using a drop down/Check box select from a list of job types, and then using a drop down select the number of positions that need filled.

I'm starting to think that this is more of a PITA than necessary and I might just end up doing it with Drop Downs so that the Field Label for a the list is the Job Type Description, and then there's a drop down to select the number of employees for that Job Type.

The downside to hard coding it like that is that it's not as Dynamic.


Jerry,

Wasn't there a way in CMSB to Hide Dependant Fields unless the Parent/Primary was filled out?

Thanks again, I'm going to keep tinkering with this all weekend. I'll throw up screen caps in a minute to help clarify.

I'm not doing this to make life difficult on myself, I would just like a good and easy way to ensure I can come up with totals:

Open Positions w/ Company ABC
2 Apprentice
3 Journeyman
1 Master

Then also list all the Openings:

20 Apprentice
30 Journeyman
10 Master etc.

Hope that makes sense.
Rusty

Re: [Rusty] Multi Section Editor with List Options from another

By gkornbluth - October 26, 2012

Hi rusty,

I guess I don't understand the "not dynamic" part and what would be hard coded?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Multi Section Editor with List Options from another

By Rusty - October 26, 2012

Oh well I mean manually creating each Job Type as a Drop Down List Quantity (as hard coded) I would think there's got to be a way to pull the labels from a multi-selection list, and also have a specific accompanying quantity value for each item selected from said list.
Rusty

Re: [Rusty] Multi Section Editor with List Options from another

By Rusty - October 26, 2012 - edited: October 26, 2012


The Jobs Section - Down at the bottom where it says Job Positions, and it simply lists them all across in a single row/selection value, I would like to make it so that the list of check boxes is show, like in the next image down, and then if the check box was selected then a drop down with quantity desired would unhide.
[IMG]http://i50.tinypic.com/mc4w7k.jpg[/IMG]


The Positions Section - What I'm driving for, but I'd like to be able to fill the Jobs Section above with the options created below. And the issue is that for this single record there are multiple Type/Position options, but only one (associated) quantity option.
[IMG]http://i50.tinypic.com/zufomg.jpg[/IMG]

The Positions Job Type Editor
[IMG]http://i50.tinypic.com/15y839h.jpg[/IMG]



I honestly think that it's a waste of time (this go round) though it's certainly something that's entertaining to consider employing later on. And yes, I am personally aware that I can do this if I make forms on a site that would provide this kind of functionality. I'll stick with the simple way in the CMS by doing Field Label: Apprentice List - Drop Down Quantity.
Rusty

Re: [Rusty] Multi Section Editor with List Options from another

By gkornbluth - October 26, 2012

Rusty,

I think I see where you're going, but why wouldn't my approach of pulling the the values for the Position and Job list fields from separate databases work for this?

And even a third field for a list of quantities of available positions from 1-n?

Or, do the positions change with each particular Job.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Multi Section Editor with List Options from another

By Rusty - October 26, 2012

Well I'm getting closer, based on your tips I modified the Section Editor for the Job Positions to be a Single Menu Type, and then created 6 records with Save & Copy:
Apprentice
Journeyman
Master
Foreman
Instructor
Management

Oddly enough, it is showing all the different Job Position Types, even though it's a Single Menu Type. CMSB still shows that there's 6 records there in the MYSQLDB, but there's no way to change them in CMSB.

So I'm close, I've got the drop down list that populates from another Menu Section. The thing I'm wanting to achieve is also showing a drop down selection list for each of the different Position Types selected.

For example the Company has a job site in Denver, and they need a full crew. So they'll hire 1 management person, 1 foreman, 3 Masters, 3 Journeymen, and 6 Apprentices.

So they'd go to the Job Site Section, create a new record in the Jobs Multi Section, fill out all the details, then select Apprentice, Journeyman, Master, Foreman, and Management. BUT they need to be able to specify 6 Apprentices, 3 Journeymen and Masters, and 1 Foreman and Management personnel.

Does that make sense?

I'm going to fiddle around and delete the Single Section Editor and make it a Multi with the Position Type as the Title, and a simple list for the quantity and see if I can get that to work.

[IMG]http://i50.tinypic.com/1h5irk.jpg[/IMG]
Rusty

Re: [Rusty] Multi Section Editor with List Options from another

By gkornbluth - October 26, 2012

Good Luck

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php