Hello Larowlan,

I am facing one more problem. Availibility calendar not showing on edit node page. I rendered the content type hotel_room_type. But it shown only in view page. Can you help me for this. I also trying by form alter not getting till now.

Thanks

Comments

larowlan’s picture

Status: Active » Needs review

Hi
Are you trying to get the calendar edit or calendar view to show on the node page?
If you're trying for the calendar edit then that will be more involved.
If you want the calendar view, you can use form_alter like so

function YOURMODULE_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'hotel_room_type_node_form') {
    $node = $form['#node']';
    hotel_booking_inc('calendars'); // Load the calendars inc file
     $form['view_calendars'] = array(
        '#value' => hotel_booking_calendars_node($node),
        '#weight' => 10,
     );
  }
}

This code is untested, you may need to change the form id.

cis.drupal’s picture

Hello larowlan,

I have implemented your code direction and its working fine now.

Kind Thanks

cis.drupal’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.