Hello again,
I have still my dreaded Hotel Reservation Availability form which works under J1.0.15 and Chronoforms 2.3.9 ...
Now I am converting all pages who use this form one by one to J1.5.X and somehow the php look-up codes in cooperation with the Profile Plug-In do not work under Joomla 1.5
This is the code a it is under Joomla 1.0.15 (and works...)
Under the Profile Page (outside the form) the following information are stored:
Table Name: jos_comprofiler
Request Parameter name : $my->id
target field name: id
And under plug-ins (inside the form) the Profile Page Plug-In is checked ....
Now by just backing this form up and restroing it under Joomla 1.5.9 and Chronoforms 3.0 it somehow does not fill my fields from the jos_comprofiler table.
I switched ON the profile plug-in inside the form and added the same information to the form outside with the Profile Plug-In where it gives me the field "id" to choose from... so the connection to the table in the back must work...
I tried to change the php call for the User ID to match up with the way Joomla 1.5 calls it as follows:
with all other settings the same, but somehow that did not do the trick, it does not fill any of my fields in from the jos_comprofiler database..
OK, I know there is something I am overlooking, but I am not sure what...
Thanks,
Heiko
I have still my dreaded Hotel Reservation Availability form which works under J1.0.15 and Chronoforms 2.3.9 ...
Now I am converting all pages who use this form one by one to J1.5.X and somehow the php look-up codes in cooperation with the Profile Plug-In do not work under Joomla 1.5
This is the code a it is under Joomla 1.0.15 (and works...)
<?php
global $my;
if ( $my->id ) {
?>
<input type="hidden" id="SubSource" name="SubSource" value="BookingEngine">
<input type="hidden" id="Action" name="Action" value="Book">
<input type="hidden" id="CnfNum" name="CnfNum" value="">
<input type="hidden" id="PlanCode" name="PlanCode" value="">
<input type="hidden" id="FirstName" name="FirstName" value="{firstname}">
<input type="hidden" id="LastName" name="LastName" value="{lastname}">
<input type="hidden" id="GuestPhone" name="GuestPhone" value="{phone}">
<input type="hidden" id="GuestAddressLine1" name="GuestAddressLine1" value="{address}">
<input type="hidden" id="GuestAddressLine2" name="GuestAddressLine2" value="{cb_privaddress}">
<input type="hidden" id="GuestCity" name="GuestCity" value="{city}">
<input type="hidden" id="GuestState" name="GuestState" value="{state}">
<input type="hidden" id="GuestCountry" name="GuestCountry" value="{country}">
<input type="hidden" id="GuestZIP" name="GuestZIP" value="{zipcode}">
<input type="hidden" id="CCType" name="CCType" value="">
<input type="hidden" id="CCNumber" name="CCNumber" value="">
<input type="hidden" id="CCName" name="CCName" value="">
<input type="hidden" id="CCExpMonth" name="CCExpMonth" value="">
<input type="hidden" id="CCExpYear" name="CCExpYear" value="">
<input type="hidden" id="FrequentGuestID" name="FrequentGuestID" value="{cb_memberno}">
<input type="hidden" id="IATA" name="IATA" value="">
<input type="hidden" id="ReferralCode" name="ReferralCode" value="">
<input type="hidden" id="Currency" name="Currency" value="USD">
<?php
} else {
?>
<input type="hidden" id="SubSource" name="SubSource" value="BookingEngine">
<input type="hidden" id="Action" name="Action" value="Book">
<input type="hidden" id="CnfNum" name="CnfNum" value="">
<input type="hidden" id="PlanCode" name="PlanCode" value="">
<input type="hidden" id="FirstName" name="FirstName" value="">
<input type="hidden" id="LastName" name="LastName" value="">
<input type="hidden" id="GuestEmail" name="GuestEmail" value="">
<input type="hidden" id="GuestPhone" name="GuestPhone" value="">
<input type="hidden" id="GuestAddressLine1" name="GuestAddressLine1" value="">
<input type="hidden" id="GuestAddressLine2" name="GuestAddressLine2" value="">
<input type="hidden" id="GuestCity" name="GuestCity" value="">
<input type="hidden" id="GuestState" name="GuestState" value="">
<input type="hidden" id="GuestCountry" name="GuestCountry" value="">
<input type="hidden" id="GuestZIP" name="GuestZIP" value="">
<input type="hidden" id="CCType" name="CCType" value="">
<input type="hidden" id="CCNumber" name="CCNumber" value="">
<input type="hidden" id="CCName" name="CCName" value="">
<input type="hidden" id="CCExpMonth" name="CCExpMonth" value="">
<input type="hidden" id="CCExpYear" name="CCExpYear" value="">
<input type="hidden" id="FrequentGuestID" name="FrequentGuestID" value="">
<input type="hidden" id="IATA" name="IATA" value="">
<input type="hidden" id="ReferralCode" name="ReferralCode" value="">
<input type="hidden" id="Currency" name="Currency" value="USD">
<?php
}
?>
<input type="hidden" id="GuestEmail" name="GuestEmail" value="<?php echo $my->email; ?>">
<select name="PropertyID" id="PropertyID" "dir="ltr" class="small">
<option selected="selected" value="3083">--- choose Hotel ---
</option>
<option value="5984">Sobriquet Madinah</option>
<option value="4759">Sobriquet Riyadh</option>
<option value="4760">Al Murjan Resort</option>
<option value="5983">Eclipse Royale Shanghai</option>
</select>
<tr>
<td>Arrival Date</td>
</tr>
<tr>
<td>
<nobr>
<select name="ArrivalDateMonth" onchange id="ArrivalDateMonth" class="small">
<option value="1">Jan</option>
<option value="2">Feb</option>
<option value="3">Mar</option>
<option value="4">Apr</option>
<option value="5">May</option>
<option value="6">Jun</option>
<option value="7">Jul</option>
<option value="8">Aug</option>
<option value="9">Sep</option>
<option value="10">Oct</option>
<option value="11">Nov</option>
<option value="12">Dec</option>
</select><select name="ArrivalDateDay" onchange id="ArrivalDateDay" class="small">
<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><select name="ArrivalDateYear" onchange id="ArrivalDateYear" class="small">
<option value="2008">2008</option>
<option value="2009">2009</option>
</select> </nobr>
</td>
</tr>
<tr>
<td>Departure Date</td>
</tr>
<tr>
<td>
<nobr>
<select name="DepartureDateMonth" onchange id="DepartureDateMonth" class="small">
<option value="1">Jan</option>
<option value="2">Feb</option>
<option value="3">Mar</option>
<option value="4">Apr</option>
<option value="5">May</option>
<option value="6">Jun</option>
<option value="7">Jul</option>
<option value="8">Aug</option>
<option value="9">Sep</option>
<option value="10">Oct</option>
<option value="11">Nov</option>
<option value="12">Dec</option>
</select><select name="DepartureDateDay" onchange id="DepartureDateDay" class="small">
<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><select name="DepartureDateYear" onchange id="DepartureDateYear" class="small">
<option value="2008">2008</option>
<option value="2009">2009</option>
</select> </nobr>
</td>
</tr>
<tr>
<td>No. of Adults</td>
</tr>
<tr>
<td>
<select name="NumberOfAdults" id="NumberOfAdults" class="small">
<option selected="selected" 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>
</select></td>
</tr>
<tr>
<td>No. of Children</td>
</tr>
<tr>
<td>
<select name="NumberOfChildren" id="NumberOfChildren" class="small">
<option selected="selected" value="0">0</option>
<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>
</select></td>
</tr>
<tr>
<td>No. of Rooms</td>
</tr>
<tr>
<td>
<select name="NumberOfRooms" id="NumberOfRooms" class="small">
<option selected="selected" 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>
</select></td>
</tr>
<tr>
<td>Rate Category:</td>
</tr>
<tr>
<td><select name="RateCat" id="RateCat" class="small">
<option value="">All</option>
<option value="COR">Corporate</option>
<option value="CVN">Convention</option>
<option value="FAM">Family</option>
<option value="GOV">Government</option>
<option value="MIL">Military</option>
<option value="PKG">Package</option>
<option value="PRO">Promotion</option>
<option value="RAC">Rack</option>
<option value="SNR">Senior</option>
<option value="TRV">Travel</option>
<option value="TUR">Tour</option>
<option value="WKD">Weekend</option>
</select></td>
</tr>
<tr>
<td>Promo/Negotiated Code</td>
</tr>
<tr>
<td>
<input type="text" id="PromoCode" name="PromoCode" size="15" maxlength="20" value="" class="small"></td>
</tr>
<tr>
<td>Group ID:</td>
</tr>
<tr>
<td>
<input type="text" id="GroupCode" name="GroupCode" size="15" maxlength="20" value="" class="small"></td>
</tr>
<tr>
<td>
<input type="submit" name="submitButton" value="Search" id="submitButton" class="small" />
</td>
</tr>
Under the Profile Page (outside the form) the following information are stored:
Table Name: jos_comprofiler
Request Parameter name : $my->id
target field name: id
And under plug-ins (inside the form) the Profile Page Plug-In is checked ....
Now by just backing this form up and restroing it under Joomla 1.5.9 and Chronoforms 3.0 it somehow does not fill my fields from the jos_comprofiler table.
I switched ON the profile plug-in inside the form and added the same information to the form outside with the Profile Plug-In where it gives me the field "id" to choose from... so the connection to the table in the back must work...
I tried to change the php call for the User ID to match up with the way Joomla 1.5 calls it as follows:
<?php
$my = JFactory::getUser();
if ( !$my->id ) {
?>
<input type="hidden" id="SubSource" name="SubSource" value="BookingEngine">
<input type="hidden" id="Action" name="Action" value="Book">
<input type="hidden" id="CnfNum" name="CnfNum" value="">
<input type="hidden" id="PlanCode" name="PlanCode" value="">
<input type="hidden" id="FirstName" name="FirstName" value="{firstname}">
.....
with all other settings the same, but somehow that did not do the trick, it does not fill any of my fields in from the jos_comprofiler database..
OK, I know there is something I am overlooking, but I am not sure what...
Thanks,
Heiko
Hi Heiko,
global $my; doesn't work in Joomla 1.5, use
Bob
global $my; doesn't work in Joomla 1.5, use
$my =& JFactory::getUser();
instead. Then echo out $my to see what is in it - I think you may now need $my->user_id instead of $my->idBob
Hey Bob:
Thanks for the quick reply, but you definitely give me too much credit that I know what I am actually doing... I am one of these people who are actually dangerous, who know a little bit of everything, but not enough to actually get it right.
The original code was actually from over a year ago, when you and Max helped me to get something I started finished (as I would never have got it to work...)
So, I tried several different ways of adding the items you suggested including changing the id to user_id... all pretty much with no success...
Also the source code in FF and IE7 seems different for the same pages...
So, if you would like to give it a shot (it's a draft site, so nothing really to break....)
http://d9367857.u119.iaweb.biz/administrator/
username: xxx
password: xxx
You are more than welcome to play around and see if you can figure out what is wrong with the form... (don;t worry about the layout, that is something I fix later, at the moment i need the functionality to work...hehe
Thanks a million,
Heiko
Thanks for the quick reply, but you definitely give me too much credit that I know what I am actually doing... I am one of these people who are actually dangerous, who know a little bit of everything, but not enough to actually get it right.
The original code was actually from over a year ago, when you and Max helped me to get something I started finished (as I would never have got it to work...)
So, I tried several different ways of adding the items you suggested including changing the id to user_id... all pretty much with no success...
Also the source code in FF and IE7 seems different for the same pages...
So, if you would like to give it a shot (it's a draft site, so nothing really to break....)
http://d9367857.u119.iaweb.biz/administrator/
username: xxx
password: xxx
You are more than welcome to play around and see if you can figure out what is wrong with the form... (don;t worry about the layout, that is something I fix later, at the moment i need the functionality to work...hehe
Thanks a million,
Heiko
Yippeeeeee,
It looks like I got it working ....
there was a space issue it seems,
That is what I have now and now it filles my fields:
in the form the Profile Plug-In is enabled and outside the form, the link to the Profile Page has the following fields:
Table: jos_comprofiler
REQUEST Parameter: !$my->user_id
Target Field: id
I hope this helps others who may have the same problem or something similar, hehe
It looks like I got it working ....
there was a space issue it seems,
That is what I have now and now it filles my fields:
<?php
$my = &JFactory::getUser();
if($my->id) {
?>
in the form the Profile Plug-In is enabled and outside the form, the link to the Profile Page has the following fields:
Table: jos_comprofiler
REQUEST Parameter: !$my->user_id
Target Field: id
I hope this helps others who may have the same problem or something similar, hehe
Hi Heiko,
I've meddled to - so make sure that I haven't meesed it up! In Joomla 1.5 $my->id always has a value - it's '0' for guests so you need to check if ( $my->id != 0 ) {
Bob
I've meddled to - so make sure that I haven't meesed it up! In Joomla 1.5 $my->id always has a value - it's '0' for guests so you need to check if ( $my->id != 0 ) {
Bob
Hey Bob:
Thanks for meddling and don't worry, just checked it and it is still working like a charm....😛 😛
Thanks for the help, now all I have to figure out if with the new Chronoforms it will break again my template once I place this into a Module Position as it did with the old Chronoforms and Joomla 1.0.x ... will post here again once i found that out😶
Thanks again,
Heiko
Thanks for meddling and don't worry, just checked it and it is still working like a charm....😛 😛
Thanks for the help, now all I have to figure out if with the new Chronoforms it will break again my template once I place this into a Module Position as it did with the old Chronoforms and Joomla 1.0.x ... will post here again once i found that out😶
Thanks again,
Heiko
OK, here is now the good and the bad news...
The form works like a charm when called by the standard function as a ?option=com_chronocontact&chronoformname=reservation
See here:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=reservation
But the form breaks the page when called in a Module position with the Mod_chronoforms ...
See here:
http://d9367857.u119.iaweb.biz/
The page stays blank and only the javascript and the first line of the form is called and than it dies ...
However funny enough, the Mod works on the page where the form is called via the com_chronocontact fnction, as that is first called and than somehow the MOD works as well...
I am puzzled ....
Heiko
ADDITION:
I even just now tried to use the chronoforms plug-in and place the form via the mod_placehere as content item into a Module position and exactly the same happens than with the Module ...
The form works like a charm when called by the standard function as a ?option=com_chronocontact&chronoformname=reservation
See here:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=reservation
But the form breaks the page when called in a Module position with the Mod_chronoforms ...
See here:
http://d9367857.u119.iaweb.biz/
The page stays blank and only the javascript and the first line of the form is called and than it dies ...
However funny enough, the Mod works on the page where the form is called via the com_chronocontact fnction, as that is first called and than somehow the MOD works as well...
I am puzzled ....
Heiko
ADDITION:
I even just now tried to use the chronoforms plug-in and place the form via the mod_placehere as content item into a Module position and exactly the same happens than with the Module ...
Hi Heiko,
Just checking - do you have the lastest CF module for Joomla 1.5 installed?
Bob
Just checking - do you have the lastest CF module for Joomla 1.5 installed?
Bob
Yup, just downloaded it a few days ago...
Mod Version: 1.1.0
Component Version: 3.0 STABLE
Plugin version: 0.8/V3.0 Stable
hmmmm, strange strange strange, isn't it ??
Heiko
Mod Version: 1.1.0
Component Version: 3.0 STABLE
Plugin version: 0.8/V3.0 Stable
hmmmm, strange strange strange, isn't it ??
Heiko
Ok, I did a little bit more testing and think I figured out that it has nothing to do with the php code or the Javascript of the form itelf as reason for not showing in a Module position.
I created a simple email form and wenn I load this form via the com_chronocontact option it as well loads the other form in the Module Position, however any other page the form in the Module Position breaks the page...
See here:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=missing_points
So, what do we call this? "undocumented feature" 🙄
Seriously I am pretty much at the end of my limited knowledge and can not really figure anymore why this happens...
Thanks,
Heiko
I created a simple email form and wenn I load this form via the com_chronocontact option it as well loads the other form in the Module Position, however any other page the form in the Module Position breaks the page...
See here:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=missing_points
So, what do we call this? "undocumented feature" 🙄
Seriously I am pretty much at the end of my limited knowledge and can not really figure anymore why this happens...
Thanks,
Heiko
Hi Heiko,
When I try to access any other page in your site I get a blank screen which means some PHP error!
try to remove all PHP code from your form HTML code box and retest and then add it back to fine what line cause the error and ask about it!
Regards
Max
When I try to access any other page in your site I get a blank screen which means some PHP error!
try to remove all PHP code from your form HTML code box and retest and then add it back to fine what line cause the error and ask about it!
Regards
Max
Hi Heiko,
There's something odd with the form-code, I took a backup copy of Reservations and restored it on my local site. It loads OK but displays below the page footer!! I'll take a closer look in the morning - I think this form coudl be simplifed a lot.
Bob
There's something odd with the form-code, I took a backup copy of Reservations and restored it on my local site. It loads OK but displays below the page footer!! I'll take a closer look in the morning - I think this form coudl be simplifed a lot.
Bob
Hi Heiko,
There were a couple of problems with the html in your form. There were no <table> or </table> tags and there were a sprinkling of misplaced <br /> tags - the combined effect was to push the form display way down the page. Here's a cleaned up version of the Form HTML that displays correctly on my test site:
Notes: 1) I've moved most of the Options generation into simple php functions. This makes the code much shorter, clearer and easier to maintain.
2) Because of the little generateOptions() function at the end you will get an error if you try to show two copies of the form on the same page!!
Bob
There were a couple of problems with the html in your form. There were no <table> or </table> tags and there were a sprinkling of misplaced <br /> tags - the combined effect was to push the form display way down the page. Here's a cleaned up version of the Form HTML that displays correctly on my test site:
<?php
$month_array = array('1' => 'Jan', '2' => 'Feb',
'3' => 'Mar', '4' => 'Apr', '5' => 'May',
'6' => 'Jun', '7' => 'Jul', '8' => 'Aug',
'9' => 'Sep', '10' => 'Oct', '11' => 'Nov',
'12' => 'Dec');
$year = date('Y');
$code_array = array(
'' => 'All',
'COR' => 'Corporate',
'CVN' => 'Convention',
'FAM' => 'Family',
'GOV' => 'Government',
'MIL' => 'Military',
'PKG' => 'Package',
'PRO' => 'Promotion',
'RAC' => 'Rack',
'SNR' => 'Senior',
'TRV' => 'Travel',
'TUR' => 'Tour',
'WKD' => 'Weekend');
?>
<table>
<tr>
<td colspan="2">Arrival Date</td>
</tr>
<tr>
<td colspan="2">
<select name="ArrivalDateMonth" onchange id="ArrivalDateMonth">
<?php
foreach ( $month_array as $k => $v ) {
echo "<option value='$k'>$v</option>";
}
?>
</select>
<select name="ArrivalDateDay" onchange id="ArrivalDateDay">
<?php generateOptions(1, 31) ?>
</select>
<select name="ArrivalDateYear" onchange id="ArrivalDateYear">
<?php generateOptions($year, $year+1) ?>
</select>
</td>
</tr>
<tr>
<td colspan="2">Departure Date</td>
</tr>
<tr>
<td colspan="2">
<select name="DepartureDateMonth" onchange id="DepartureDateMonth">
<?php
foreach ( $month_array as $k => $v ) {
echo "<option value='$k'>$v</option>";
}
?>
</select>
<select name="DepartureDateDay" onchange id="DepartureDateDay">
<?php generateOptions(1, 31) ?>
</select>
<select name="DepartureDateYear" onchange id="DepartureDateYear">
<?php generateOptions($year, $year+2) ?>
</select>
</td>
</tr>
<tr>
<td>Adults</td>
<td>
<select name="NumberOfAdults" id="NumberOfAdults">
<?php generateOptions(1, 10) ?>
</select>
</td>
</tr>
<tr>
<td>Â Kids</td>
<td>
<select name="NumberOfChildren" id="NumberOfChildren">
<?php generateOptions(1, 10) ?>
</select>
</td>
</tr>
<tr>
<td>Number of Rooms  </td>
<td>
<select name="NumberOfRooms" id="NumberOfRooms">
<?php generateOptions(1, 9) ?>
</select>
</td>
</tr>
<tr>
<td colspan="2">Rate Category</td>
</tr>
<tr>
<td colspan="2">
<select name="RateCat" id="RateCat">
<?php
foreach ( $code_array as $k => $v ) {
echo "<option value='$k'>$v</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2">Promo/Negotiated Code</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="PromoCode" name="PromoCode" size="20" maxlength="20" value="">
</td>
</tr>
<tr>
<td colspan="2">Group ID</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="GroupCode" name="GroupCode" size="20" maxlength="20" value="">
</td>
</tr>
<tr>
<td>
<input type="submit" name="submitButton" value="Search" id="submitButton" />
</td>
<td>
<input type="reset" name="resetButton" value="Reset" id="resetButton" />
</td>
</tr>
</table>
<?php
$my = &JFactory::getUser();
if ( $my->id != 0 ) {
?>
<input type="hidden" id="FirstName" name="FirstName" value="{firstname}">
<input type="hidden" id="LastName" name="LastName" value="{lastname}">
<input type="hidden" id="GuestPhone" name="GuestPhone" value="{cb_phone}">
<input type="hidden" id="GuestAddressLine1" name="GuestAddressLine1" value="{cb_address1}">
<input type="hidden" id="GuestAddressLine2" name="GuestAddressLine2" value="{cb_address2}">
<input type="hidden" id="GuestCity" name="GuestCity" value="{cb_city}">
<input type="hidden" id="GuestState" name="GuestState" value="{cb_state}">
<input type="hidden" id="GuestCountry" name="GuestCountry" value="{cb_country}">
<input type="hidden" id="GuestZIP" name="GuestZIP" value="{cb_zipcode}">
<input type="hidden" id="FrequentGuestID" name="FrequentGuestID" value="{cb_memberno}">
<?php
} else {
?>
<input type="hidden" id="FirstName" name="FirstName" value="">
<input type="hidden" id="LastName" name="LastName" value="">
<input type="hidden" id="GuestEmail" name="GuestEmail" value="">
<input type="hidden" id="GuestPhone" name="GuestPhone" value="">
<input type="hidden" id="GuestAddressLine1" name="GuestAddressLine1" value="">
<input type="hidden" id="GuestAddressLine2" name="GuestAddressLine2" value="">
<input type="hidden" id="GuestCity" name="GuestCity" value="">
<input type="hidden" id="GuestState" name="GuestState" value="">
<input type="hidden" id="GuestCountry" name="GuestCountry" value="">
<input type="hidden" id="GuestZIP" name="GuestZIP" value="">
<input type="hidden" id="FrequentGuestID" name="FrequentGuestID" value="">
<?php
}
?>
<input type="hidden" id="PropertyID" name="PropertyID" value="3083">
<input type="hidden" id="SubSource" name="SubSource" value="HotelSite">
<input type="hidden" id="Action" name="Action" value="Book">
<input type="hidden" id="CnfNum" name="CnfNum" value="">
<input type="hidden" id="PlanCode" name="PlanCode" value="">
<input type="hidden" id="CCType" name="CCType" value="">
<input type="hidden" id="CCNumber" name="CCNumber" value="">
<input type="hidden" id="CCName" name="CCName" value="">
<input type="hidden" id="CCExpMonth" name="CCExpMonth" value="">
<input type="hidden" id="CCExpYear" name="CCExpYear" value="">
<input type="hidden" id="IATA" name="IATA" value="">
<input type="hidden" id="ReferralCode" name="ReferralCode" value="">
<input type="hidden" id="Currency" name="Currency" value="USD">
<input type="hidden" id="GuestEmail" name="GuestEmail" value="<?php echo $my->email; ?>">
<?php
function generateOptions($start, $end){
for ( $i = $start; $i <= $end; $i++ ) {
echo "<option value='$i'>$i</option>";
}
}
?>
Notes: 1) I've moved most of the Options generation into simple php functions. This makes the code much shorter, clearer and easier to maintain.
2) Because of the little generateOptions() function at the end you will get an error if you try to show two copies of the form on the same page!!
Bob
Hi Max and Bob:
Thanks for the input and help, do really appreciate it...
Max: There is actually not much php in the form except for the following:
and
dividing the two sets of different situations what to do with hidden fields (first fills in the hidden fields via the Profile Phg In, while second scenario leaves them empty.
and than of course a proper closing and the addition of the email address:
That's it basically with the php...
When I take all of this out and use only the set of hidden fields to be filled in via the Profile Plug-In, than the form loads in the Module Position well, but the Profile Plug-In does not fill in my hidden fields anymore. All it shows that are the fieldnames in the { } ...
Addition, Just realized that I did not activate the Profile Page outside with the Parameters and the jos_comprofiler table and when I do this, than again the dreaded white page comes, so even the php code is out it does not load the form in the Module Position...???
see source code here: http://d9367857.u119.iaweb.biz/
At the same time, if I leave the php in, but take the checkmark out for the Profile Plug-In, than again it loads the form in the Module Position, but of course does not fill in the values as well.
See source code here:
http://d9367857.u119.iaweb.biz/index.php?option=com_content&view=article&id=11&Itemid=25
You can log on with the credentials provided here earlier for Bob.
Ok, that pretty much runs me out of ideas....
Thanks again for all your help guys...
Heiko
Thanks for the input and help, do really appreciate it...
Max: There is actually not much php in the form except for the following:
<?php
$my = &JFactory::getUser();
if ( $my->id != 0 ) {
?>
and
<?php
} else {
?>
dividing the two sets of different situations what to do with hidden fields (first fills in the hidden fields via the Profile Phg In, while second scenario leaves them empty.
and than of course a proper closing and the addition of the email address:
<?php
}
?>
<input type="hidden" id="GuestEmail" name="GuestEmail" value="<?php echo $my->email; ?>">
That's it basically with the php...
When I take all of this out and use only the set of hidden fields to be filled in via the Profile Plug-In, than the form loads in the Module Position well, but the Profile Plug-In does not fill in my hidden fields anymore. All it shows that are the fieldnames in the { } ...
Addition, Just realized that I did not activate the Profile Page outside with the Parameters and the jos_comprofiler table and when I do this, than again the dreaded white page comes, so even the php code is out it does not load the form in the Module Position...???
see source code here: http://d9367857.u119.iaweb.biz/
At the same time, if I leave the php in, but take the checkmark out for the Profile Plug-In, than again it loads the form in the Module Position, but of course does not fill in the values as well.
See source code here:
http://d9367857.u119.iaweb.biz/index.php?option=com_content&view=article&id=11&Itemid=25
You can log on with the credentials provided here earlier for Bob.
Ok, that pretty much runs me out of ideas....
Thanks again for all your help guys...
Heiko
Hi Heiko,
It may just be that using the Profile PlugIn inside ChronoForms inside the Module is too may layers of code trying to interact :-(
I'm sure that it's soluble but it might be simpler here just to add the code to read the profile file directly into the form html.
Bob
It may just be that using the Profile PlugIn inside ChronoForms inside the Module is too may layers of code trying to interact :-(
I'm sure that it's soluble but it might be simpler here just to add the code to read the profile file directly into the form html.
Bob
Hi Bob:
Seems we were typing both at the same time for our posts...
First of all thank you very much for your time and effort to redo the whole form...
I took the whole code you created and replaced the form code in a copy of my reservation form called reservation_bob.
When I just copy and paste this and leave the Profile Page outside with no information, than the form loads properly, except it does not fill the hidden fields.
However if I put the following information into the Profile Page for this form:
Than I get again the dreaded white screen when calling the form in a module position
http://d9367857.u119.iaweb.biz/index.php?option=com_content&view=article&id=8&Itemid=22
while it works when calling the form via the com_chronocontact function:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=reservation_bob
and it fills all data properly into the hidden fields ....
Do I need to change anything on the Target Field or the Request Parameter name??
Thanks again,
Heiko
Seems we were typing both at the same time for our posts...
First of all thank you very much for your time and effort to redo the whole form...
I took the whole code you created and replaced the form code in a copy of my reservation form called reservation_bob.
When I just copy and paste this and leave the Profile Page outside with no information, than the form loads properly, except it does not fill the hidden fields.
However if I put the following information into the Profile Page for this form:
Table name: jos_comprofiler
REQUEST Parameter name: !$my->user_id
Target Field name: id
Than I get again the dreaded white screen when calling the form in a module position
http://d9367857.u119.iaweb.biz/index.php?option=com_content&view=article&id=8&Itemid=22
while it works when calling the form via the com_chronocontact function:
http://d9367857.u119.iaweb.biz/index.php?option=com_chronocontact&chronoformname=reservation_bob
and it fills all data properly into the hidden fields ....
Do I need to change anything on the Target Field or the Request Parameter name??
Thanks again,
Heiko
Hi Heiko,
I'm pretty certain that you can't use !$my->user_id in the Profile REQUEST Parameter box - this could be causing your blank pages.
But if you leave that field blank then ChronoForms will I think insert the value of $my->id by default.
Bob
I'm pretty certain that you can't use !$my->user_id in the Profile REQUEST Parameter box - this could be causing your blank pages.
But if you leave that field blank then ChronoForms will I think insert the value of $my->id by default.
Bob
Hi Bob:
When I take the REQUEST Parameter out and leave it empty than pretty much the same than before happens...
The form loads fine via the com_chronocontact function and loads the hidden fields correctly, but the form does not load in the Module Position and leaves me still with the dreaded white page...
Hummmmm????
Heiko
PS: Sent you the sql dump by email already, thanks again...
When I take the REQUEST Parameter out and leave it empty than pretty much the same than before happens...
The form loads fine via the com_chronocontact function and loads the hidden fields correctly, but the form does not load in the Module Position and leaves me still with the dreaded white page...
Hummmmm????
Heiko
PS: Sent you the sql dump by email already, thanks again...
Hi Heiko,
There's a little buglet in the Profile plugin that shows up when you use it in the module. Open up cf_profile.php; find line 4 which reads
Bob
There's a little buglet in the Profile plugin that shows up when you use it in the module. Open up cf_profile.php; find line 4 which reads
require_once( $mainframe->getPath( 'class' ) );
and change it to require_once( $mainframe->getPath( 'class', 'com_chronocontact' ) );
ChronoForms should now be able to find its class file and run the PlugIn OK.Bob
This topic is locked and no more replies can be posted.