how to "add another item" for 2 or more items with select list inside of one
clashar - June 15, 2009 - 14:58
| Project: | Job Search |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | clashar |
| Status: | active |
Jump to:
Description
I need to create University 1 with following custom fields:
1) University
2) Faculty
3) Dates (start-end)
4) GPA
then I need a button "add another item" for University 2 and maybe courses so that all four empty items could be added by one button click.
And at least one field: "University" should be select list of predefined options.
so, how to:
1) "add another item" (as it is possible with "text" field but not with select list) where 4 fields should be added by one click
2) select list inside of first field
Please help!

#1
this is all when creating fields for resume.
#2
any answer?
#3
Hi,
I faced the same need as you some months ago. I am working on a self-made dynamic content type (that i called resumetype) to use with this jobsearch module. (a resume is actually a quiet complex content type)
It will allow to add block of fields (where blocks are "education/training" information or "experience" information (group of fields : date, textfields, etc...) of a resume. Assuming you don't know how many of those blocks a user will want to fill in.
I followed some AHAH tutorials to do this like the default poll module in drupal core.
To be honest, it take a long time to understand how to do this and wasn't easy for me, i hope to commit this somewhere soon. Please says so if this interests someone.
Guim
#4
Hello,
it interests me for sure, and I think this is very useful feature to the job module and will be requested by anyone using job module.
Please let me know in this thread or give your link for any news with tutorial on this issue.
#5
guim_led, still no news?
Anyone other can propose smth?
#6
Not yet! but I am working on it! I didn't give any news as things are not yet ready to be shown. At least, I know now that my employer is not against putting this code under GPL so I will see if creating a related module to jobsearch is possible. I am following the Drupal API the best I can and read a lot about it. As this is my first drupal module, it takes time too.
Just some explanation on what I am doing : a "complex" content type using 6 tabs :
1- personnal information (name, email,...)
2- experience (blocks of 4 fields start date, endate company name and function) where those blocks can be dynamically added (AHAH method)
3- formation (blocks of 4 fields start date, endate insitution and diploma) where those blocks can be dynamically added
4- spoken languages (blocks of 3 fields for each language : speak, read write where they have to enter a value between 0 and 4 as their level ) those blocks can be dynamically added but ES,EN, FR and NL (Dutch) are compulosry blocks
5- skills (also dynamic blocks, with competences they can define themself. this part is not yet ready)
6- miscenalleous : among other things : the possibility to upload a DOC or PDF CV as well, (if they didn't feel comfortable with this form)
I worked a lot on it last weeks and it is "on a good way" but it is still to early to show it. Don't expect things to be ready in few weeks , I know I still have a lot of hooks to implement so maybe in 1-2 months i have something usable, but I will need beta tester too! (unfortunately, i have lots of others priorities now in my job...)
Keep in touch then . I will try to give some news once it is "testable".
#7
Nice to hear you again.
Let me know as soon as it could be testable, so I could be the first tester ))
Good luck on this task man!!
#8
Hi guim_led,
do you have some news for your development?
#9
Hi Clashar,
Bad news ... i didn't work on this yet... I hope to start again in september (actually the website i have to has to be ready for december so.... i will have to do it!!!)
If you want to see the code as it is right now, just give me an email and I can send it to you, it still too early to create a module on drupal website with right now.
Guim
#10
Hi all,
I do that with multigroup on CCK v3-dev ;)
And It's work fine ;)
You can wait a stable release or test to use it ;)
Bye
#11
i did test it too, a few months ago. But as you say :
-it is still beta (I did have problems using it but can't remember what exactly right now)
-I couldn't combine it with a tab system for very long content that a resume can be. Forms become too long to be on a single page, so using a tab module AND multigroup, I didn't succeed on this!
#12
Hi,
I use it for resume too, but I don't use tab...
I just saw another person had the same problem :
http://drupal.org/node/530878
Bye
#13
Hi Guim, hope u r fine and your code too ))
yes I want to see and test the code, please send it to clashar(at)yahoo(dot)com
#14
So here is how I did it:
I needed to "Sub-Types" for my Resume CCK type. I needed:
Previous Employment
Employer
Date
Location (City, State, Zipcode)
Job Title
Education
Institution
Degree Received
Date
Location (City, State, Zipcode)
So, I used a patch for CCK called Nested Fieldgroups (#300084: Nested fieldgroup). It allows for nesting and grouping CCK fields into a "Sub-Type" and allows for actions like "Add another item" to the list. It also supports "Required number of items", "Maximum number of items". It is not compatible with all CCK fieldtypes, but is compatible with many of them and worked great for my project's needs for the Resume.