Hi
I wanted us know how to export the data in the database from Frontend registered with the Form. Possibly even stacked.
I with the old system I created a Form and used the following code, now I do not know how.
Thanks
I wanted us know how to export the data in the database from Frontend registered with the Form. Possibly even stacked.
I with the old system I created a Form and used the following code, now I do not know how.
Thanks
<?php
$app = &JFactory::getApplication();
?>
<div class="ccms_form_element cfdiv_select" id="tabella_container_div">
<label>Tabella</label><select size="1" class=" validate['required']" title=""
type="select" name="tabella">
<option value="" selected>Scegli una tabella</option>
<?php
//questo codice permette di popolare la dropdown con le tabelle di chronforms
$db =& JFactory::getDBO();
$query = "SHOW TABLES LIKE '%chronoforms_Iscrizioni1%'";
//$query = "SHOW TABLES ";
$db->setQuery($query);
$nomes = $db->loadResultArray();
//print_r($nomes);
$nome_options = "";
$i=0;
foreach ( $nomes as $v ) {
$nome_options .= "<option value='".$nomes[$i]."' >".$nomes[$i]."</option>";
$i++;
echo $nome_options;
?>
</select>
<div title="Tabella" rel="Seleziona una tabella da esportare" class="tooltipimg">
<a href="#">?</a></div><div class="small-message">Seleziona una tabella</div>
<div class="clear"></div><div id="error-message-tabella"></div></div>
<div class="ccms_form_element cfdiv_select" id="separatore_container_div">
<label>Separatore</label><select size="1" class="" title="" type="select" name="separatore">
<option value="">Scegli un separatore</option>
<option value=",">Virgola</option>
<option value=";">Punto e virgola</option>
<option value="|">Barra verticale</option>
<option value="tab">Tabulazione</option>
</select>
<div title="Separatore" rel="Scegli un separatore dei campi della tabella" class="tooltipimg">
<a href="#">?</a>
</div><div class="small-message">Scegli un separatore dei campi della tabella</div>
<div class="clear"></div><div id="error-message-separatore"></div></div>
<div class="ccms_form_element cfdiv_submit" id="input_submit_2_container_div">
<input name="input_submit_2" class="" value="Submit" type="submit" />
<div class="clear"></div><div id="error-message-input_submit_2"></div></div>
<?php } ?>
Hi pepepa,
It looks as if that will give you a drop-down list of tables. It should still work in a CFv5 form if you add it to a custom Code element.
Bob
It looks as if that will give you a drop-down list of tables. It should still work in a CFv5 form if you add it to a custom Code element.
Bob
HI GreyHead
I created a new Form simple, pasted the code and changed the name of the database but does not work in CFv5.
It makes me choose the database but does not appear in the drop-down menu does not make me any database and select the separator.
With the old ChronoForms worked perfectly.
I attach two photos in before the old system is working and what is wrong in the second.
What should I correct?
thanks
I created a new Form simple, pasted the code and changed the name of the database but does not work in CFv5.
It makes me choose the database but does not appear in the drop-down menu does not make me any database and select the separator.
With the old ChronoForms worked perfectly.
I attach two photos in before the old system is working and what is wrong in the second.
What should I correct?
thanks
Hi pepepa,
It looks to me as if you have a bug in your PHP, I think that the last <?php } ?> is in the wrong place.
Bob
It looks to me as if you have a bug in your PHP, I think that the last <?php } ?> is in the wrong place.
Bob
Hi pepepa,
Only to suggest that you carefully debug your custom code :-(
Bob
Only to suggest that you carefully debug your custom code :-(
Bob
This topic is locked and no more replies can be posted.