Page 1 of 1

need to display items to show like in demo

PostPosted: Thu Nov 26, 2009 9:23 am
by xtophe
Hi eveybody... i a newbie in web development :) ... i found this calendar very helpfull... i have a booking for with three type of room ... i would like to show the availability of each room... perhaps like in the demo..."items to show".... anyone can help me...... thx....

Re: need to display items to show like in demo

PostPosted: Thu Nov 26, 2009 10:29 am
by chris
Hi there and welcome.

This topoc has actually been covered many times in this forum and is actually quite simple.

Take a look at this thread: viewtopic.php?f=9&t=58
I hope you can follow the steps there.

I would modify just one thing from that thread, in the "select" code we have this:
Code: Select all
<select name="id_item">
<?php
foreach($items as $id=>$title){
echo '<option id="'.$id.'">'.$title.'</option>';
}
?>
<select>

That would be better being like this:
Code: Select all
<select name="id_item">
<?php
foreach($items as $id=>$title){
echo '<option id="'.$id.'"'; if(ID_ITEM==$id) echo 'selected="selected"'; echo '>'.$title.'</option>';
}
?>
<select>

That will "remember" the current item in the select list.
Let me know if you need further help :)

Chris