Is this remotely anything that chronoforms might be able to do?
I am open to ideas.
Thanks,
Michael Klocke<br><br>Post edited by: mlklocke, at: 2008/02/13 16:06
<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_4 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".mosGetParam($_POST,'Recipe_Name','')."' , '".mosGetParam($_POST,'Recipe_Submitted','')."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
Now i guess the question is how does this get turned into content from here.
The Profile Plugin is more useful as it allows you to pull data from an existing Joomla database table like #__chronoforms_4
To display your data, create a new form. In the form HTML box write the HTML for your display page as usual but put {Recipe_name} and (Recipe_Submitted} where you want that data to show up. Save the form then select it in the forms manager and click the Profile Plugin icon and complete the forms. IIRC correctly it will ask you for the record id field and the names of the fields you want to read. Check the i tooltips for more info
Recipe name : {Recipe_Name}
{Recipe_submitted}
though you'll probably want to pretty it up a bit more than that.
<?php
$next_recipe = $_GET['recipe_id'] + 1;
?>
<a href='index.php?option=com_chronocontact&chronoformname=my_recipes&recipe_id=<?php echo $next_recipe; ?>' >Next recipe</a>
You'd probably make it prettier than that but basically that's it.