I am going to plead a fair amount of Drupal ignorance here...
How do I add a button or a link at the end of a piece of content that will then take some action?
I have two content types called 'job posting' and 'resume'. So, UserA creates a job posting (ideally, "Apply for this job" link should not be visible during creation of the job posting). UserB logs in, and sees the job posting. I need to have a link at the bottom of the posting that says "Apply for this job", and when they click on it, UserB should be presented with a list of their resumes, they can have more than one (I have already created a view for this), be able to choose one, and email it to the job poster, UserA (Also created an action for emailing).
So far, I have a view to return a list of the user's resumes, but I am not sure how to add a radio button so they can choose one of them to submit. I also created an action to email the job poster, but this may be able to be handled by the webform email submission utility.
Any help or pointers are greatly appreciated!
Thanks
Comments
Comment #1
quicksketchI don't see where Webform comes into the the equation here. This sounds like an entirely CCK based need. It's important to know that webform submissions are not nodes, so they can't be displayed in views or through any means other than what webform provides for you already.
For your need, it sounds like you need to theme your view so that there is a link to submit a node (application) for a job. You should try using a hook_form_alter() then to make the application node type automatically select a node reference based on the URL. Such as node/add/application/[nid]. Where [nid] automatically becomes the nid for a node reference field in your form (you need to program that part manually in custom module).
Anyway. I think this is way out of the scope of webform. You should post to the forums or ask in #drupal-support about implementation details like this.
Comment #2
cbannerjee commentedThanks for the input. I thought using webform might make the 'take some action' somewhat easier on me.
I will try your suggestion with the theming and hook_form_alter(). Look out PHP coding, here comes danger! :-)
Comment #3
rickvug commentedComment #4
doublejosh commentedI'm a little confused. When you create a webform you can add field for name, email, etc... all of which are followed by a nice "Submit" button.
-josh