Need help with a complicated web site

Events happening in the community are now at Drupal community events on www.drupal.org.
Sigal's picture

Hi,

I am new to Drupal, and the first site I got to create is very complicated.

I need to create a form for capturing CV details.

The form has different sections like: skills / education / language etc.

The user should be able to save the form and come back to it later and continue filling it up.

The system should also show the user which parts where completed and which still need to be filled in.

The user should be able to edit/add/delete any content he captured in this form.

Can anyone help me with that?

Thank you,

Sigal

Comments

Shouldn't be too bad

alistairpott's picture

This is the beauty of Drupal - most of what you have described can be set up pretty easily and with no coding! I'm no expert myself
(only set up a single site), but what you describe shouldn't be too difficult.

  • Use the CCK module to set up a new
    Content Type called 'CV'. You can easily add all the sections and fields using CCK.
    Now users can create and save new CVs and you don't have to do any form coding!
  • You can then set the Access Control settings (Admin > User Management > Access Control) so that users can only edit their own CV
    nodes but anyone can create a new CV

The most difficult part is highlighting area's that still need to be completed. I would be interested to hear what suggestions more experiences users have for
that functionality...

CCK is beautiful!

burningdog's picture

@Sigal, you're about to discover the power of drupal! You can build your own content types through the drupal interface - you don't need to do it with php code. This is what CCK does - you can add a new content type, and then add specific fields to that type (like a drop-down box for "skills" or "language") and then you can mark that field "required" if you'd like.

Once you've done that, you'll need to take a look at "access control" in the admin section - and create a new role - "job seeker" - and then give that person permission to create CV's and to edit their own CV's.

That should get you far enough :)

Thank you

Sigal's picture

Thank you guys, I did play with CCK since yesterday, but how will I connect the cv the user captures to the user?

As I understand it, those are the steps I need to take:

  1. Create new content type called: cv type: page (?)
  2. Ok, here is where I get stuck... hmmm... already :)
  • How can I create a menu link to give the user the option to capture these fields?
  • How will I link this form that he fills with the user? So when he logs in again, he can see what he captured already and continue capturing?

What do I miss?

Many ways of doing everything

alistairpott's picture

Drupal is great because it is flexible enough to give you many ways of doing anything. That said, I think your first step should be to plan exactly what you want out of your install. From the sounds of things you do have a basic plan.

As for your questions:

  • Every CV node that is created will automatically be associated with the user that created it. This user is the Node Author
  • Creating a new content type will automatically include that content type in the ‘Create content’ menu on the left
  • You could also use the menu management (Admin > Site building > Menu) to create other links if you like
  • Finally, you should also look into the superb Views module which you could use to list only CVs created by the current user. You could create a block listing CVs associated with the current user and put the block into the menu.

PS - I assume that there can only be 1 CV per user? Perhaps consider using the Bio module in conjunction with your CV content type. Then you can embed the CV onto the users account page.

Thanks Alistair

Sigal's picture

First, thank you for all the help, I really appreciate it.

I think it's a bit more complicated than what you think.

If I create a content type called cv, and add 5 fields to it:

Organization
Subject
School
From Date
To Date

I group them in a group called education.

Then I link them to the profile content.

When I go to my account, I see each field by itself, they are not connected to each other, so I don't know for example, which date belongs to which subject, and which subject belongs to which organization.

The views won't work here, since the view doesn't display anything if nothing was captured.

I need an organized form where each section has it's own fields to capture, and some of the sections can have multiple groups of these fields.

Like several education subjects.

And as I said, I also need to be able to tell the user what does he still needs to complete and what was completed.

It looks like, I will need a whole new module for this thing. Am I wrong?

An example of a complex-ish node built in CCK

burningdog's picture

Take a look at a conference registration form I built. It's not exactly a CV but it has a whole stack of different types of fields and also groups. All of it was done in CCK - take a look and see if this helps.

There's also a module that will let you split up adding a single node over several pages. Let me know if that's useful and I'll find it.

Module writing should generally be avoided

alistairpott's picture

In most cases it isn’t necessary to create a new module – you should avoid going down that route if you can.

CCK does default view formatting for you – i.e. the way the node looks in View mode. However, that formatting isn’t always what you want and then you can:

  • Use a node template file to specify your exact format
  • There is a module called Content Template (Contemplate) which you can use to format the node view. This is the route that I recommend in most cases – it will allow you to format the node’s fields exactly how you want. You could customize the view to highlight fields that still need to be entered.

I have often been tempted to write my own module to get things done – but in general that just isn’t worth it. Writing a module is quite a lot of work!

To the contrary

adrian's picture

Writing a module file is often the fastest, easiest and simplest way to get out of dependency hell.

Instead of using 23 modules that get you most of the way there, writing 1 module that gets you all of the way there, or at least
integrates them cleanly the way you want to.

You should also only use contemplate for prototyping, and move these templates to your own themes / modules as soon as possible.

You should try to never have php code stored in the database. All your code should be contained in custom themes / modules, which are version controlled and maintained. : http://2bits.com/articles/free-your-content-php-moving-php-code-out-bloc...

Imagine what happens when you use functions in your contemplate that change between a drupal version. Essentially you stop your site from being upgraded AT_ALL since you can't get into your site to edit the template, so you have to modify the database with sql queries by hand to try and get your site upgraded.

Whereas if these were in a file, you could just open them with a text editor and save when done.

So, writing your own modules is great. The thing that must be avoided at all costs is MODIFYING DRUPAL CORE.

--
The future is so Bryght, I have to wear shades.

Thanks

alistairpott's picture

Good advice - thanks. I must admit that I quickly found Contemplate pretty pointless because using theme files seemed better - your reasoning lends logic to my gut feel. I also find it easier for updating and tweaking to have the formatting in a theme file.

On the module front, I really didn't mean to imply modules should never be written (they are one of the best things about Drupal) just that they are often not the easiest way to get things done. However, that is from the perspective of a mid to low level Drupaller. I think that once you get the hang of module dev it is the easiest way to get exactly what you're after.

I am quite keen to write a module for learning purposes but have always been able to get things done using existing modules (also my pesky day job chews up so much time!) I saw that Lullabot released a scaffolding module for Drupal 6 to assist with module dev - I think I'll use that to do some learning.

Module Reusability

jlab's picture

In my personal experience coding a module for Drupal is not very difficult since Drupal provides an excellent API to do most things. And if you are serious about web development you should at least know a bit of PHP, MySQL, HTML and CSS.

A module is also re usable and it is easier modifying a existing module to better suit your needs.
You can write more flexible validation code and have a lot more control on how you want your content to be displayed.

A great example to start from is "node_example.module"

http://api.drupal.org/api/file/developer/examples/node_example.module/6/... (Drupal 6)
http://api.drupal.org/api/file/developer/examples/node_example.module/5/... (Drupal 5)

I sometimes use CCK and Views to prototype most of my applications to see if I have the right idea and logic in mind. Or for creating a custom node with a few extra fields.

CCK and Views IMHO is the equivalent of VisualBasic for online development... You don't really need to know how to code to produce something useful .... But you don't really learn much from the experience either.

Content Template

Sigal's picture

Hi again,

I did look at the content template before, but can't figure out how to use it.

Do I need to find a node.tpl.php file in the directory, copy it and change it's name?

If I look at my theme directory there is no node.tpl.php file there only block and page.

If I look at the Content Template page on my site, I see a CV option, which I created, but when I go in there, I don't understand what am I suppose to do there... do I need to put php print statements in the body?

Sorry, I am totally new to Drupal and struggling a bit...

Thank you BurningDog

Sigal's picture

Thanks, I looked at the site you sent, and it looks great, but I still don't know how to do it...

By the way, why are you burning ??? get out of the fire !!! :)

Burning!

burningdog's picture

I'm not burning - the dog is! The best piece of advice I ever received was "Never pet a burning dog." And so I haven't.

Do you know about the drupal meetup next Saturday in Joburg? If you're in the area, stop by - you'll get a good deal of your questions answered!

I'm using Drupal 5.7 for my production sites right now - haven't made the switch to 6 yet. Perhaps some others have some advice around whether using 6 is advisable right now...

Anyway, at least you know that building a complex form in CCK is possible - keep playing with it till it comes right! You might want to read the CCK handbook which gives a stack of helpful info...

Alternatives

Max_Headroom's picture

Hi Sigal

I just want to reiterate what have been said:
If you want to get serious with Drupal, then I would always recommend to anybody to get to know CCK and Views asap. And as mentioned here, once you know those two, you don't need to be able to write modules to be able to do forms and custom views, and a lot more.
There is a lot of info on the Drupal site in the documents and tutorials. Spend some time with it.

There are some alternatives available that you could use as well. I'm not sure what your intention of your site is, but if you want to have a per user CV, you can also set up Profiles module (comes default with Drupal), So as users register, they fill in the fields there and a profile is created for them. They can go back and complete or edit their profiles afterwards. Just set up the necessary permissions for who can view the profiles, etc.

Then there is a few third party custom forms modules you can download and use as well. I've never been too happy with any of them and found I always go back to CCK and views.

Welcome to Drupal :)
Quentin

Quentin

Ok

Sigal's picture

Ok, now I'm more confused than I was :)

Listen guys, do any of you want to help me with this part of the site for payment?

If so, please let me know how much would you want, so I can give a quote to my client.

They need the site urgently so I don't have the time to learn everything.

I did courses of php and css but I'm new and don't have much experience with either, especially not with Drupal.

If anyone is interested, please let me know was soon as possible.

You are all stars for answering all my questions, I'm very impressed and can't wait to keep in touch with all of you.

Test This Module

jlab's picture

http://www.dark.za.org/files/recruitment.zip

This is a module I am still developing... It is for use with Drupal 5.x

Install the module and enable it then
goto -> Create Content -> Add CV

Have a look if this covers most of what you are interested in.

And let me know if you want anything changed...

Doh!

burningdog's picture

I would say yes but I'm at a conference all of tomorrow and am backlogged with other work...maybe someone else can?

Sorry - can't help

alistairpott's picture

Sorry Sigal, I'm off to Knysna for some running so won't be able to help out. Good luck!

Thanks personxx

Sigal's picture

But I'm using Drupal 6.2

South Africa

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week