Forums

Auto Populate

acaddy 03 Nov, 2009
Hi,

I'm Building a support survey to be filled out by our customers after they call our help desk. I'm trying to auto-populate one field with data from a URL, is this possible? Details below:

[*]SalesForce.com generates a unique support ticket ID and sends it in a link via email to the end user. http://www.OURDOMAIN.com/support-survey/UNIQUE-ID
[*]User clicks on the link and gets directed to the form. The UNIQUE ID is input automatically into the first field of the form.

Thanks!
GreyHead 03 Nov, 2009
Hi acaddy,

Yes I think you can do this. The Joomla JURI() object contains the passing URL and you can extract the query string from this and parse the variables.. I'm not exactly sure how to do it with a SEF style URL but I'm sure that it's possible.

Bob
acaddy 03 Nov, 2009
Hi Bob,

Glad to hear it's possible. If anyone has any other detailed info on how to make this work, I'd love to hear from you.

Thanks!
acaddy 05 Nov, 2009
anyone?

Thanks!🙂
nml375 05 Nov, 2009
Hi,
Something like this should do the trick:
<?
$trackingID = basepath(JURI::getInstance()->getPath());
?>
Tracking ID: <input type="text" name="trackingID" value="<? echo $trackingID; ?>" />
...


/Fredrik

Edit: Seems I mangled the html-code slightly..
acaddy 09 Nov, 2009
Hi Fredrik,

Can you elaborate on this a little bit more? Specifically with the implementation? What files etc.?

Thanks!!
GreyHead 09 Nov, 2009
Hi acaddy,

Here's a slight variant on Fredrik's code using JURI to grab the url. This goes in the Form HTML box:
<?php
// get the current url
$uri =& JFactory::getURI();

// explode the path on '/'
$vars = explode('/', $uri->getPath());

// take the last entry
$unique_id = array_pop($vars);

// output the result as a demo
echo '<div>$unique_id: '.print_r($unique_id, true).'</div>';
?>
<input type='hidden' name='unique_id' value='<?php echo $unique_id; ?>' />

This is designed to work with a URL of the type you describe http://www.OURDOMAIN.com/support-survey/UNIQUE-ID where the unique_id is the last element of a /-separated string. It could easily be modified to work with other forms of URL. You need to be clear what you are handling though.

Bob
acaddy 10 Nov, 2009
Thanks Bob!

I've added the code and it is pulling the unique id from the URL. However, it doesn't add it to the first text box in my form. One other thing I forgot to mention is that I'd also like to hide the first field from the user. The data should pass into the field and then to SalesForce, but the user shouldn't be able to see or modify the data.

Below is the code I have so far...

<?php
// get the current url
$uri =& JFactory::getURI();

// explode the path on '/'
$vars = explode('/', $uri->getPath());

// take the last entry
$case_number = array_pop($vars);

// output the result as a demo
echo '<div>$case_number: '.print_r($case_number, true).'</div>';
?>
<input type='hidden' name='case_number' value='<?php echo $case_number; ?>' />

<input type=hidden name="oid" value="VALUE FROM SALESFORCE">
<input type=hidden name="retURL" value="http://www.xxxxxxxxxxxx.com">
<input type=hidden name="lead_source" value="Support Survey">
<input type=hidden name="recordType" value="VALUE FROM SALESFORCE">
<input type=hidden name="Name" value="Customer Support Survey">
<input type=hidden name="Company" value="Our Company">

<b><h4>Headline Text Goes here.</b></h4><br>
<div class="row">
<label for="case_number"> <span class="label"><b>1.</b> Case Number*</span></label>
<input id="VALUE FROM SALESFORCE" maxlength="15" name="VALUE FROM SALESFORCE" size="20" type="text" />
<br></div>
<div class="row">
<label for="knowledge"><span class="label"><b>2.</b> How would you rate the Technical Support Department’s knowledge?*</span></label>
<select id="VALUE FROM SALESFORCE" name="VALUE FROM SALESFORCE" title="Tech Knowledge">
    <option value="">Please Select</option>
    <option value="Very Satisfied">Very Satisfied</option>
    <option value="Satisfied">Satisfied</option>
    <option value="Neutral">Neutral</option>
    <option value="Dissatisfied">Dissatisfied</option>
    <option value="Very Dissatisfied">Very Dissatisfied</option>
</select><br></div>
<div class="row">
<label for="resolve_request"><span class="label"><b>3.</b> Was the Technical Support Department able to assist you in resolving your request for assistance in a timely manner?*</span>
<select id="VALUE FROM SALESFORCE" name="VALUE FROM SALESFORCE" title="Resolved Timely">
    <option value="">Please Select</option>
    <option value="Very Satisfied">Very Satisfied</option>
    <option value="Satisfied">Satisfied</option>
    <option value="Neutral">Neutral</option>
    <option value="Dissatisfied">Dissatisfied</option>
    <option value="Very Dissatisfied">Very Dissatisfied</option>
    </select><br></div>
<div class="row">
<label for="professionalism"><span class="label"><b>4.</b> How satisfied are you with the Technical Support Specialist’s level of professionalism and courtesy?*</span>
<select id="VALUE FROM SALESFORCE" name="VALUE FROM SALESFORCE" title="Professional Courtesy">
    <option value="">Please Select</option>
    <option value="Very Satisfied">Very Satisfied</option>
    <option value="Satisfied">Satisfied</option>
    <option value="Neutral">Neutral</option>
    <option value="Dissatisfied">Dissatisfied</option>
    <option value="Very Dissatisfied">Very Dissatisfied</option>
    </select><br></div>
<div class="row">
<label for="overall"><span class="label"><b>5.</b> Overall, how satisfied are you with the technical support you received?*</span>
<select id="VALUE FROM SALESFORCE" name="VALUE FROM SALESFORCE" title="Overall Satisfaction">
    <option value="">Please Select</option>
    <option value="Very Satisfied">Very Satisfied</option>
    <option value="Satisfied">Satisfied</option>
    <option value="Neutral">Neutral</option>
    <option value="Dissatisfied">Dissatisfied</option>
    <option value="Very Dissatisfied">Very Dissatisfied</option>
    </select><br></div>
<div class="row">
<label for="additional_comments"><span class="label"><b>6.</b> Are there any additional comments you would like to share?</span>
<textarea  id="VALUE FROM SALESFORCE" name="VALUE FROM SALESFORCE" type="text" wrap="soft" rows="3" cols="30"></textarea><br></div>
<div class="row">
<input type="submit" name="submit" value="Submit Survey"><br><br></div>
GreyHead 10 Nov, 2009
Hi acaddy,

My code adds it to a hidden field so that it doesn't display to the user. I think that's what you are asking for. It will still be visible in the page source if someone goes hunting though.

Bob
acaddy 12 Nov, 2009
Thanks Bob and Fredrik,

Everything is working great!
alivebyscience 23 Nov, 2009

This is designed to work with a URL of the type you describe http://www.OURDOMAIN.com/support-survey/UNIQUE-ID where the unique_id is the last element of a /-separated string. It could easily be modified to work with other forms of URL. You need to be clear what you are handling though. Bob



I trust this won't be judged a new thread - seems like a continuation to me so here goes...

A tiny bit of background... I'm using an email marketing service and forms don't work in most email clients. My newsletter recipients need a button to click that asks for someone to call them. We have all the data we need in the mailing list, and we can place that data into the email template. So the plan is, within the template, to construct a URL for the email, and upon clicking the URL the reader is taken to a form where they verify their phone # or preferred contact method, and then click GO! to complete their request. Makes it easy for them - ideally they enter nothing! Click, click, done. Oh... did I mention I redirect them to an appropriate landing page? Hmmm. What will become of that?

Back to the task... For this job I need to pass chronoform the data from the personalization features of the email system (see tags below in the square brackets [ ]). When the email service sends the mail it replaces the tags with data values (ie [fullname] will be replaced with Tom Kelly, for example).

I need to push this data to a chronoform form (of course) so they have to enter nothing. For this I need chronoform to read the info from the URL, and load the data into the appropriate fields of the form as the default values.

http://www.mydomain.com/form?email=[email]&name=[fullname]&phone[phone]&prefmethod[prefmethod]

You say, GreyHead, that your example code can be easily modified for other forms of URLs. Great! Right on! How would the code need to change to read my URL? (note to self: gotta find a store that sells that joomla/php super hero cape).

For those of you searching for stuff like this here's a keyword that might help: $_get

TIA.
abs
GreyHead 23 Nov, 2009
Hi alivebyscience,

Here's one that I did earlier today. Not quite the same but you can modify it easily enough. In the Form HTML
<?php
$artist = JRequest::getString('artist', '', 'get');
$track_name = JRequest::getString('track_name', '', 'get');
$label = JRequest::getString('label', '', 'get');
$urls = JRequest::getString('urls', '', 'get');
$user = & JFactory::getUser();
?>
<div>Artist : <?php echo $artist; ?></div>
<input type='hidden' name='artist' value='<?php echo $artist; ?>' />
// repeat for other fields


URL:
http://www.example.com/index.php?option=com_chronocontact&chronoformname=add_track&artist=Elvis%20Presley&track_name=Blue%20Suede%20Shoes&label=RCA&urls=http://moretrax.com


Bob
alivebyscience 24 Nov, 2009
Yup, GreyHead, that worked.

Thank you!
abs
basic 29 Apr, 2011
Hi

how to get the data in utf-8 or I mean get the data in the fields for non Latin characters (Greek)

Any help?

Thank you
GreyHead 29 Apr, 2011
Hi basic,

Make sure that the page is in UTF-8; and urlencode the values that you want to pass.

Bob
basic 29 Apr, 2011
Hi Bob

the query comes from a VICIDIAL Call Center, so I don't know how to do, they send me just the full query from their application (a call center with Asterix), something like this

http://192.168.3.240/webform/index.php?lead_id=7&phone_number=2111042600&title=&first_name=infobell&middle_initial=&last_name=LTD&address1=Kratitos+10&address2=&address3=&city=&state=Ne&province=&postal_code=17122&comments=Eteria+pliroforikis

.... and I have to populate just some fields in my form, and this is my code

<?php 
$last_name = JRequest::getString('last_name', '', 'get');
$first_name = JRequest::getString('first_name', '', 'get');
$address1 = JRequest::getString('address1', '', 'get');
$address2 = JRequest::getString('address2', '', 'get');

$postal_code = JRequest::getString('postal_code', '', 'get');
$address3 = JRequest::getString('address3', '', 'get');
$city = JRequest::getString('city', '', 'get');
$phone_number = JRequest::getString('phone_number', '', 'get');
$comments = JRequest::getString('comments', '', 'get');


$synolo_ac = JRequest::getString('Additional2', '', 'post');

$user = & JFactory::getUser();
?>


<p>

<div align="center">Προσθήκη νέας καταχώρισης - 
  
  Ολα τα πεδία με * είναι υποχρεωτικά. </div>
<table width="95%" border="1" align="center">
   <tr>
   <td>
   
   <table width="95%" border="0" align="center">
    <tr>

      <td colspan="4" align="center"><b>1. Βασικά στοιχεία επικοινωνίας</b></td>
    </tr>
    <tr>
      <td colspan="4" align="center"> </td>
    </tr>
    <tr>
      <td>Επώνυμο*</td>
      <td><input id="last_name" type='inputbox' name='last_name' value='<?php echo $last_name; ?>' /></td>

      <td>Όνομα*</td>
      <td><input id="first_name" type='inputbox' name='first_name' value='<?php echo $first_name; ?>' /></td>
    </tr>
    <tr>
      <td>Οδός*</td>
      <td><input id="address1" type='inputbox' name='address1' value='<?php echo $address1; ?>' /></td>
      <td>Αριθμός* </td>

      <td><input id="address2" type='inputbox' size="4" name='address2' value='<?php echo $address2; ?>' />        T.K.
     <input id="postal_code" type='inputbox' size="5" name='postal_code' value='<?php echo $postal_code; ?>' /> </td>
    </tr>
    <tr>
      <td>Περιοχή*</td>
      <td> <input id="address3" type='inputbox' name='address3' value='<?php echo $address3; ?>' /> </td>
      <td>Πόλη</td>
      <td><input id="city" type='inputbox' name='city' value='<?php echo $city; ?>' /> </td>

    </tr>
    <tr>
      <td>Σταθερό*</td>
      <td><input id="phone_number" type='inputbox' name='phone_number' value='<?php echo $phone_number; ?>' /> </td>
      <td>Επάγγελμα</td>
      <td><input id="comments" type='inputbox' name='comments' value='<?php echo $comments; ?>' /> </td>
    </tr>
        <tr>

          <td colspan="4" align="center"><span style="color:#F00"></span></td>
        </tr>
    </table>
  </td>
  </tr>
</table>




<table width="95%" border="1" align="center">
     <tr>
       <td><table width="95%" border="0" align="center">
         <tr>

           <td colspan="4" align="center"><b>2. Συμπληρωματικά στοιχεία επικοινωνίας</b></td>
         </tr>
         <tr>
           <td colspan="4" align="center"> </td>
         </tr>
         <tr>
           <td>Κινητό*</td>
           <td><input type="text" id="field_hotline" class="inputbox"  name="field_hotline" size="10" maxlength="10"    /> </td>

           <td>Fax*</td>
           <td><input type="text" id="field_fax" class="inputbox"  name="field_fax" size="10" maxlength="10"    /> </td>
         </tr>
         <tr>
           <td>Email :</td>
           <td><input type="text" id="field_email" class="inputbox"  name="field_email" size="30" maxlength="100"    /> </td>
           <td> </td>
           <td> </td>

         </tr>
         <tr>
           <td colspan="4" align="center"><span style="color:#F00"></span></td>
         </tr>
       </table></td>
     </tr>
</table>

<table border="1"  width="95%" align="center" >
     <tr>

       <td ><label class="description">
         <center>
           <b>3. Τεχνικά στοιχεία</b>
         </center>
       </label>
         <center>
           <span style="color:red"> Προσπαθούμε να πάρουμε όσο το δυνατόν περισσότερες πληροφορίες απο το
             πελάτη. <br />

           </span><br />
               

   Τεμάχια A/C
   
<select onclick="additional(this.value)" name="Additional2" id="Additional2">
    <option name="0tem" value="0">Επιλογή</option>
    <option name="1tem" value="30">1</option>
    <option name="2tem" value="60">2</option>
    <option name="3tem" value="90">3</option>

    <option name="4tem" value="120">4</option>
    <option name="5tem" value="150">5</option>
    <option name="6tem" value="180">6</option>
    <option name="7tem" value="210">7</option>
    <option name="8tem" value="240">8</option>
    <option name="9tem" value="270">9</option>

    <option name="10tem" value="300">10</option>
    <option name="11tem" value="330">11</option>
    <option name="12tem" value="360">12</option>
    <option name="13tem" value="390">13</option>
    <option name="14tem" value="420">14</option>
    <option name="15tem" value="450">15</option>

    <option name="16tem" value="480">16</option>
    <option name="17tem" value="510">17</option>
    <option name="18tem" value="540">18</option>
    <option name="19tem" value="570">19</option>
    <option name="20tem" value="600">20</option>
  </select>

  
    
 
  



  <strong>Κόστος</strong>
    <input type="hidden" value="1" name="Additional2" id="Additional2" size="5" onblur="doCalculate()"/>
   <strong> Υπηρεσίας  </strong>

<input type='hidden' name='synolo_ac' value='' />


   
    <input type="text" name="total" id="total" readonly="readonly" /> € + ΦΠΑ          
         </center>

       <br />
       
        
         
         <table width="95%" border="0" align="center">
           <tr>
             <td width="121" align="center">9000 BTU <input type="text" id="field_ac_items_btu" class="inputbox"  name="field_ac_items_btu" size="3"     />  (τεμ.)</td>
             <td width="121" align="center">12000 BTU <input type="text" id="field_ac_items_btu12" class="inputbox"  name="field_ac_items_btu12" size="3"     />  (τεμ.)</td>
             <td width="134" align="center">15000 BTU <input type="text" id="field_ac_items_btu15" class="inputbox"  name="field_ac_items_btu15" size="3"     />  (τεμ.)</td>

             <td width="134" align="center"> 18000 BTU <input type="text" id="field_ac_items_btu18" class="inputbox"  name="field_ac_items_btu18" size="3"     />  (τεμ.)</td>
           </tr>
           <tr>
             <td align="center">24000 BTU <input type="text" id="field_ac_items_btu24" class="inputbox"  name="field_ac_items_btu24" size="3"     />  (τεμ.)</td>
             <td align="center"> </td>

             <td align="center"> </td>
             <td align="center"> </td>
           </tr>
           <tr>
             <td align="center"><h5>Τύπος A/C</h5></td>
             <td align="center">Τοίχου
             <input type="text" id="field_ac_type_toixou" class="inputbox"  name="field_ac_type_toixou" size="3"     />  (τεμ.)</td>
             <td align="center" >Οροφής
             <input type="text" id="field_ac_type_orofis" class="inputbox"  name="field_ac_type_orofis" size="3"     />  (τεμ.)</td>

             <td align="center" >Ντουλάπα
             <input type="text" id="field_ac_type_ntoulapa" class="inputbox"  name="field_ac_type_ntoulapa" size="3"     />  (τεμ.)</td>
           </tr>
            
         </table>
         
       </td>
     </tr>
</table>



<table border="1"  width="95%" align="center" >

     <tr>
       <td ><label class="description">
         <center>
           <b>4. Ραντεβού</b>
         </center>
       </label>
        
         <table width="95%" border="0" align="center">
           <tr>

             <td width="121" align="center">Ημερ. Ραντεβού 
               <input type="text" id="field_calendar" class="inputbox"  name="field_calendar" size="10"  readonly="readonly"   /> <span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span><input name="reset" type="reset" id="field_calendar_calendarButton" class="button art-button" onclick="return showSobiCalendar( 'field_calendar', 'field_calendar_calendarButton');" value="... " /></span></td>
             <td width="134" align="center" >Ώρα 
<select name="field_time" id="field_time" size="1" class="inputbox"  >
	<option value="8" >8-9</option>
	<option value="9" >9-10</option>
	<option value="10" >10-11</option>

	<option value="11" >11-12</option>
	<option value="12" >12-13</option>
	<option value="13" >13-14</option>
	<option value="14" >14-15</option>
	<option value="15" >15-16</option>
	<option value="16" >16-17</option>

	<option value="17" >17-18</option>
	<option value="18" >18-19</option>
	<option value="19" >19-20</option>
	<option value="20" >20-21</option>
</select>
 </td>
           </tr>
           <tr>

             <td align="center"> </td>
             <td align="center" > </td>
           </tr>
         </table></td>
     </tr>
</table>


<table border="1"  width="95%" align="center" >
     <tr>
       <td ><label class="description">

         <center>
           <b>4. Επιπλεόν Σχόλια</b>
         </center>
       </label>
        
         <table width="95%" border="0" align="center">
           <tr>
             <td width="121" align="center"><textarea rows="3" cols="50"  id="field_description" name="field_description"    class="inputbox" ></textarea> </td>
           </tr>

           <tr>
             <td align="center"> </td>
           </tr>
         </table></td>
     </tr>
</table>
 <table width="95%" border="0" align="center">
           <tr>
             <td width="121" align="center">
<input type="submit" name="submit" id="submit" value="Υποβολή Αιτήματος" />   <input id="reset" type="reset" value="Ακύρωση Αιτήματος" />
</td>
           </tr>

           <tr>
             <td align="center"> </td>
           </tr>
         </table></td>
     </tr>
</table>


any idea?
GreyHead 02 May, 2011
Hi basic,

I think that the link you posted is to a page on your local area network- I can’t access anything useful there. Please can you post the example here somehow.

Bob
basic 03 May, 2011
Hello

I just managed to get the data, but now my problem is the email template that I have something like this
<!--?php  $last_name = JRequest::getString('last_name', '', 'get'); $last_name = rawurldecode($last_name); $first_name = JRequest::getString('first_name', '', 'get'); $address1 = JRequest::getString('address1', '', 'get'); $address2 = JRequest::getString('address2', '', 'get');  $postal_code = JRequest::getString('postal_code', '', 'get'); $address3 = JRequest::getString('address3', '', 'get'); $city = JRequest::getString('city', '', 'get'); $phone_number = JRequest::getString('phone_number', '', 'get'); $comments = JRequest::getString('comments', '', 'get');  $user = & JFactory::getUser(); ?-->
<p> </p>
<div>Προσθήκη νέας καταχώρισης <br /></div>
<table style="width: 95%;" border="1" align="center">
<tbody>
<tr>
<td>
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td colspan="4" align="center"><strong>1. Βασικά στοιχεία επικοινωνίας</strong></td>
</tr>
<tr>
<td colspan="4" align="center"></td>
</tr>
<tr>
<td>Επώνυμο*</td>
<td><input id="last_name" name="last_name" type="inputbox" value="<?php echo $last_name; ?>" /></td>
<td>Όνομα*</td>
<td><input id="first_name" name="first_name" type="inputbox" value="<?php echo $first_name; ?>" /></td>
</tr>
<tr>
<td>Οδός*</td>
<td><input id="address1" name="address1" type="inputbox" value="<?php echo $address1; ?>" /></td>
<td>Αριθμός*</td>
<td><input id="address2" name="address2" size="4" type="inputbox" value="<?php echo $address2; ?>" /> T.K.      <input id="postal_code" name="postal_code" size="5" type="inputbox" value="<?php echo $postal_code; ?>" /></td>
</tr>
<tr>
<td>Περιοχή*</td>
<td><input id="address3" name="address3" type="inputbox" value="<?php echo $address3; ?>" /></td>
<td>Πόλη</td>
<td><input id="city" name="city" type="inputbox" value="<?php echo $city; ?>" /></td>
</tr>
<tr>
<td>Σταθερό*</td>
<td><input id="phone_number" name="phone_number" type="inputbox" value="<?php echo $phone_number; ?>" /></td>
<td>Επάγγελμα</td>
<td><input id="comments" name="comments" type="inputbox" value="<?php echo $comments; ?>" /></td>
</tr>
<tr>
<td colspan="4" align="center"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="1" align="center">
<tbody>
<tr>
<td>
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td colspan="4" align="center"><strong>2. Συμπληρωματικά στοιχεία επικοινωνίας</strong></td>
</tr>
<tr>
<td colspan="4" align="center"></td>
</tr>
<tr>
<td>Κινητό*</td>
<td>{mobile}</td>
<td>Fax*</td>
<td>{fax}</td>
</tr>
<tr>
<td>Email :</td>
<td>{email}</td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4" align="center"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="1" align="center">
<tbody>
<tr>
<td><label class="description"> <strong>3. Τεχνικά στοιχεία</strong> </label> <br /> 
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr class="rsform-block rsform-block-product1">
<td width="91">{Product1}</td>
<td width="130">Τεμ. 	    {QuantityProd1}</td>
<td width="117">{Product2}</td>
<td width="113">Τεμ. 	    {QuantityProd2}</td>
<td width="101">{Product3}</td>
<td width="98">Τεμ. {QuantityProd3}</td>
</tr>
<tr class="rsform-block rsform-block-product2">
<td>{Product4}</td>
<td>Τεμ. {QuantityProd4}</td>
<td>{Product5}</td>
<td>Τεμ. {QuantityProd5}</td>
<td></td>
<td></td>
</tr>
<tr class="rsform-block rsform-block-product3">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="rsform-block rsform-block-total">
<td>
<div class="formClr"><strong>Κόστος</strong> <strong> Υπηρεσίας </strong></div>
</td>
<td>{Total} € + ΦΠΑ</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="rsform-block rsform-block-items">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td width="129" align="center"><strong>Τύπος /τεμ.</strong></td>
<td width="205" align="center">Τοίχου              {field1}</td>
<td width="179" align="center">Οροφής              {field2}</td>
<td width="241" align="center">Ντουλάπα              {field3}</td>
<td width="479" align="center">{Total1} Τεμ.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="1" align="center">
<tbody>
<tr>
<td><label class="description"> <strong>4. Ραντεβού</strong> </label> 
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td width="121" align="center">Ημερ. Ραντεβού                 {field_calendar} <span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span></span></td>
<td width="134" align="center">Ώρα  {time}</td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="1" align="center">
<tbody>
<tr>
<td><label class="description"> <strong>5. Επιπλεόν Σχόλια</strong> </label> 
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td width="121" align="center">{description}</td>
</tr>
<tr>
<td align="center"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table style="width: 95%;" border="0" align="center">
<tbody>
<tr>
<td width="121" align="center">{This_element_has_no_name_attribute}</td>
</tr>
<tr>
<td align="center"></td>
</tr>
</tbody>
</table>


as you can see for example <input id="last_name" name="last_name" type="inputbox" value="<?php echo $last_name; ?>" />

does not render right to post the data to my email, any help?

Thank you
basic 03 May, 2011
Sorry, my mistake, it just needs the {name_value}
GreyHead 03 May, 2011
Hi basic,

Yes that will work well.

You can use PHP in the Email template but you must turn off the Rich Text editor first.

Bob
basic 04 May, 2011
Hello

is there any integration with calendar? the idea is that I need to check available days and hours of booking hourly services like A/C cleaning, checking etc, I tried extcalendar 2 but no luck with real time posting data, I have to manual populate in extcalendar database, anyone have integration calendar events with chronoforms? The only matter is the day and the hour availability. I found something like time slot bookings, but is there any way to connect with chronoforms an external database?

Thank you
GreyHead 04 May, 2011
Hi basic,

I don't know of anyone linking to a calendar - but it is possible to link ChronoForms to almost anything if you can find out how to do it and write the necessary code. It helps if the other application runs in Joomla! and has a documented interface though.

Bob
basic 04 May, 2011
Hello
thank you for the reply, so my analysis is to use chronoconnectivity with a joomla extension calendar, is there any integration that works well with this scheme ?

Thank you
Nikos
GreyHead 04 May, 2011
Hi Nikos,

I'm sorry, I just don't know.

Bob
basic 04 May, 2011
Hello Bob,

I manage to connect the extcalendar with your code
   
 <?php
    $options = array('host' => 'xxx', 'user' => 'xxx', 'password' => 'xxx', 'database' => 'crm', 'prefix' = '', 'select' => 'leads');
    $db2 =& new JDatabaseMySQL($options);
    $query = "
    INSERT
       INTO `leads` (`first_name`, `last_name`)
       VALUES ('text_1','text_2') ;
    ";
    $db2->setQuery($query);
    $db2->query();
    ?>


my code
 <?php
    $options = array('host' => 'localhost', 'user' => 'xxx', 'password' => 'xxx', 'database' => 'extc', 'prefix' => '', 'select' => 'extcal_events');
    $db2 =& new JDatabaseMySQL($options);
    $query = "
    INSERT
       INTO `extcal_events` (`first_name` , `time`)
       VALUES ('fname','time') ;
    ";
    $db2->setQuery($query);
    $db2->query();
    ?>



but, what I get in `first_name` is the name of the field (fname) in my external database and not the data submitted (Nikos)

my form uses a select list values

<select name="field_time" id="field_time" size="1" class="inputbox" >
<option value="8" >8-9</option>
<option value="9" >9-10</option>
<option value="10" >10-11</option>

<option value="11" >11-12</option>
<option value="12" >12-13</option>
<option value="13" >13-14</option>
<option value="14" >14-15</option>
<option value="15" >15-16</option>
<option value="16" >16-17</option>

<option value="17" >17-18</option>
<option value="18" >18-19</option>
<option value="19" >19-20</option>
<option value="20" >20-21</option>
</select>



so I don't get the values of the fields, only the name of the field, how to get also the values of the select list? what I'm doing wrong

Thank you
Nikos
Max_admin 10 May, 2011
Hi Nikos,

I didn't read the full story but regarding your last post, I think you have a mistake, here is a revised version:

<?php
    $options = array('host' => 'localhost', 'user' => 'xxx', 'password' => 'xxx', 'database' => 'extc', 'prefix' => '', 'select' => 'extcal_events');
    $db2 =& new JDatabaseMySQL($options);
    $query = "
    INSERT
       INTO `extcal_events` (`first_name` , `time`)
       VALUES ('".JRequest::getVar('fname')."','".time()."') ;
    ";
    $db2->setQuery($query);
    $db2->query();
    ?>


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.