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

  • Home
  • SEARCH
  • 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 7622949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:34:59+00:00 2026-05-31T04:34:59+00:00

I had used the date module in Drupal 6 for my custom module.But in

  • 0

I had used the date module in Drupal 6 for my custom module.But in Drupal 7, i am getting this error

Fatal error: Call to undefined function date_popup_load() in C:\xampp\htdocs\widgetcorp\sites\all\modules\freeway\freeway.admin.inc on line 164 

This is the form iam using it in is as follows.

function create_freeway_project (){
  $node = node_load(arg(1));
  $form = array();
  date_popup_load();

  $form['title'] = array(
  '#type' => 'textfield',
  '#title' => t('Project Description'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);

  $form['custRef'] = array(
  '#type' => 'textfield',
  '#title' => t('Customer Reference'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);

  $form['poRef'] = array(
  '#type' => 'textfield',
  '#title' => t('PO Reference'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);


  $form['splinst'] = array(
  '#type' => 'textarea',
  '#title' => t('Special Instructions'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);


  $form['strtdate'] = array(
  '#type' => 'date_popup',
  '#title' => t('Delivery Date'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);


  $form['enddate'] = array(
  '#type' => 'date_popup',
  '#title' => t('End Date'),
  '#size' => 60,
  '#maxlength' => 128,
  '#required' => TRUE,
);


   $form['create_project_btn'] = array(
    '#type' => 'submit',
    '#value' => 'Create Freeway Project',
  );


   return $form;

}

Is the Jquery_UI module to be added ? I did not find its mention in the Date module for Drupal 7.
Please let me know if i am missing something.

Thanks
A

  • 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-05-31T04:35:01+00:00Added an answer on May 31, 2026 at 4:35 am

    You don’t need to do any of the setup yourself in Drupal 7, it’s as simple as this:

    $form['strtdate'] = array(
      '#type' => 'date_popup',
      '#title' => t('Delivery Date'),
      '#size' => 60,
      '#maxlength' => 128,
      '#required' => TRUE,
      '#date_format' => 'd/m/Y H:i' // With this format you'll get a date popup box AND a time widget. Obviously you can change this to whatever you need.
    );
    

    The date module will handle adding the required JS.

    Have a look at the date_popup_element_info() function for a full list of the available options for this element type.

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

Sidebar

Related Questions

I used this code in my users views and had no trouble: <% if
I had posted other questions relating to this problem, but haven't had any responses
I have this bug Warning: date() [function.date]: It is not safe to rely on
We had a Nullable object must have a value error today on this line
I had used Server Explorer and related tools for graphical database development with Microsoft
I had used several ways to do some simple integer arithmetic in BASH (3.2).
I had used the below code to get the row index of the UIPickerView
Feeling I had not enough control over the chart if I had used a
I want to get zip code from users current location(Latitude, Longitude), I had used
I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript

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.