Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8218031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:39:00+00:00 2026-06-07T12:39:00+00:00

I am working on a Drupal site that needs to have a ‘careers’ page.

  • 0

I am working on a Drupal site that needs to have a ‘careers’ page. I have a list of twenty or so jobs, and 30 or so locations where these jobs may be available.

What I am looking to do is make it so, when a job becomes available, all that needs to be done is the user selects the job title and the location where it is available and it will create the posting with the job description and other info I have along with the info for that location.

Another hurtle I am running into is making it so I can have multiple instances… ex. If the same job is available at two or more locations.

I have been trying to wrap my mind around how I am going to make this work and am coming up blank. If anyone has an idea to point me in the right direction, it would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:39:02+00:00Added an answer on June 7, 2026 at 12:39 pm

    Sounds like a pretty common use case; if it was me I’d approach it like this:

    • Create a ‘Job’ content type
    • Add a new ‘Location’ Vocabulary
    • Add a term reference field on the ‘Job’ content type to the ‘Location’ vocabulary, with unlimited values (or the maximum no. of locations you want to allow per job).
    • Create a custom form for your admins, something like:

      function MYMODULE_add_job_form($form, &$form_state) {
        $form['title'] = array(
          '#type' => 'textfield',
          '#title' => t('Title'),
          '#maxlength' => 255,
          '#required' => TRUE
        );
      
        // Load the vocabulary (the machine name might be different).
        $vocabulary = taxonomy_vocabulary_machine_name_load('location');
      
        // Get the terms
        $terms = taxonomy_get_tree($vocabulary->vid);
      
        // Extract the top level terms for the select options
        $options = array();
        foreach ($terms as $term) {
          $options[$term->tid] = $term->name;
        }
      
        $form['locations'] = array(
          '#type' => 'select',
          '#title' => t('Locations'),
          '#options' => $options,
          '#multiple' => TRUE,
          '#required' => TRUE
        );
      
        $form['submit'] = array(
          '#type' => 'submit',
          '#value' => t('Add job')
        );
      
        return $form;
      }
      
    • Create a custom submit handler for the form to add the new node programatically:

      function MYMODULE_add_job_form_submit($form, &$form_state) {
        $location_tids = array_filter($form_state['values']['locations']);
      
        $node = new stdClass;
        $node->type = 'job';
        $node->language = LANGUAGE_NONE;
        node_object_prepare($node);
      
        $node->title = $form_state['values']['title'];
        $node->field_location_term_ref[LANGUAGE_NONE] = array();
      
        foreach ($location_tids as $tid) {
          $node->field_location_term_ref[LANGUAGE_NONE][] = array(
            'tid' => $tid
          );
        }
      
        node_save($node);
      
        $form_state['redirect'] = "node/$node->nid";
      }
      

    You’ll need to add a page callback for that form obviously, and there’ll likely be some small changes you’ll need to make (names of fields etc), but it should give you a good starting point. You’ll also need to load the location taxonomy terms at some point to extract the description info you mentioned…you can use taxonomy_term_load() to do that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Drupal 6 site that some CSS issues. I have
I have a page that works fine pulling users and locations from a Drupal
I have Drupal 7 site which is working fine. I added a custom PHP
I'm working with Jquery in Drupal. I have sets of four blocks that all
While working on an existing Drupal site I've noticed a strange glitch that causes
I am working on developing a drupal site right now. I have created a
I am working on a drupal site that has a form submit ajax call
Working an a Drupal 6 site that I inherited, and I'm having a bit
I have a Drupal 6 site where I've created a view that shows a
I'm currently working on a Flash application that needs to save files to Drupal.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.