PDA

View Full Version : Add a conventional form


yofu
02-27-2008, 07:14 AM
Hi guys I am running a hotel reservations and I need to add a form to each page, like this:

<!--forma-->
<table width="120" border="1" cellpadding="10" cellspacing="0" bordercolor="#0066FF" class="index-table-border">
<tr><td class="index-select-dest-bg">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<form action="http://go.cheaphotelcenter.com/index.jsp?pageName=hotAvail&cid=192236&isHotels=true&isCondos=false&hotelID=105799&passthrough=true" method="POST" name="hotForm">
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><b>Sheraton Cancun Resort</b></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td nowrap class="index-text">Arrival Date:<br/>
<select class="form-select" name="arrivalMonth" onchange="javascript:amadChange(document.hotForm.arrivalMont h, document.hotForm.arrivalDay, document.hotForm.departureMonth, document.hotForm.departureDay);">
<option value=0>January</option>
<option value=1>February</option>
<option value=2>March</option>
<option value=3>April</option>
<option value=4>May</option>
<option value=5>June</option>
<option value=6>July</option>
<option value=7>August</option>
<option value=8>September</option>
<option value=9>October</option>
<option value=10>November</option>
<option value=11>December</option>
</select>
<select class="form-select" name="arrivalDay" onchange="amadChange(document.hotForm.arrivalMonth, document.hotForm.arrivalDay, document.hotForm.departureMonth, document.hotForm.departureDay)">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
<option value=8>8</option>
<option value=9>9</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
<option value=13>13</option>
<option value=14>14</option>
<option value=15>15</option>
<option value=16>16</option>
<option value=17>17</option>
<option value=18>18</option>
<option value=19>19</option>
<option value=20>20</option>
<option value=21>21</option>
<option value=22>22</option>
<option value=23>23</option>
<option value=24>24</option>
<option value=25>25</option>
<option value=26>26</option>
<option value=27>27</option>
<option value=28>28</option>
<option value=29>29</option>
<option value=30>30</option>
<option value=31>31</option>
</select>
</td>
</tr>
<tr>
<td nowrap class="index-text">Departure Date:<br/>
<select class="form-select" name="departureMonth" onchange="javascript:dmddChange(document.hotForm.departureMo nth,document.hotForm.departureDay);">
<option value=0>January</option>
<option value=1>February</option>
<option value=2>March</option>
<option value=3>April</option>
<option value=4>May</option>
<option value=5>June</option>
<option value=6>July</option>
<option value=7>August</option>
<option value=8>September</option>
<option value=9>October</option>
<option value=10>November</option>
<option value=11>December</option>
</select>
<select class="form-select" name="departureDay" onchange="dmddChange(document.hotForm.departureMonth,documen t.hotForm.departureDay)">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
<option value=8>8</option>
<option value=9>9</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
<option value=13>13</option>
<option value=14>14</option>
<option value=15>15</option>
<option value=16>16</option>
<option value=17>17</option>
<option value=18>18</option>
<option value=19>19</option>
<option value=20>20</option>
<option value=21>21</option>
<option value=22>22</option>
<option value=23>23</option>
<option value=24>24</option>
<option value=25>25</option>
<option value=26>26</option>
<option value=27>27</option>
<option value=28>28</option>
<option value=29>29</option>
<option value=30>30</option>
<option value=31>31</option>
</select>
</td>
</tr>
<tr>
<td><img src="http://go.cheaphotelcenter.com/images/p.gif" height="5" width="100%" border="0" onload="loadDates(document.hotForm.arrivalMonth, document.hotForm.arrivalDay, document.hotForm.departureMonth, document.hotForm.departureDay)" /></td>
</tr>
<tr>
<td rowspan="2" align="right"><input type="submit" name="Submit" value=" Check Availabity " class="button"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="http://go.cheaphotelcenter.com/images/p.gif" height="5" width="100%" border="0" /></td>
</tr>
<input type="hidden" name="submitted" value="true"/>
<input type="hidden" name="avail" value="true"/>
<input type="hidden" name="pickUpLocation" value="A">
<input type="hidden" name="passThrough" value="true">
<input type="hidden" name="locale" value="en_US"/>
</form>
</table>
</td></tr></table>
<!--forma-->
How can I ?

andy77
02-27-2008, 08:32 AM
Add the form to /article/default.tpl template or/and homepage/default.tpl

yofu
02-27-2008, 04:33 PM
Mmm but if I do that the same form would be on all the pages, what I need is to add the form with each ID-hotel...how can I do that for example

Hotel Parnasus id code: 111
Hotel Blue Bay id code: 122

and so on....

andy77
02-28-2008, 07:51 AM
If there is few hotels, you can duplicate article template and have one for each hotel, i.e. article/parnasus.tpl, article/blue-bay.tpl, and so on.

Obviously, this won't work if you have a 100 hotels :) In this case you should probably create some logic behind this to insert the appropriate ID as VTE tag. If you're not a skilled programmer, I suggest you contact Vivvo team for customization work, or go to Marketplace forum (or any other freelance site).