The Form Wizard can't fulfill my requirement. So, I need to create a custom form in Form Code.
My form content is inside an external php file. What I need is to include this file in Form HTML.
But I don't know where I should put this file. I had try put it in web root directory and \components\com_chronocontact
My form content is inside an external php file. What I need is to include this file in Form HTML.
But I don't know where I should put this file. I had try put it in web root directory and \components\com_chronocontact
Hi DHLao,
You can put it anywhere you like, personally I tend to create a com_chronocontact/includes folder
You could also copy and paste the html from your external file into the Form HTML box (or at least the part between the <form> tags.
Bob
You can put it anywhere you like, personally I tend to create a com_chronocontact/includes folder
You could also copy and paste the html from your external file into the Form HTML box (or at least the part between the <form> tags.
Bob
Thanks for the reply,
but make <form> tag in Form HTML box cause error message "You are not allowed to access this URL " in frontend.
I know many people encounter this problem and I can't find a solution for this.
I'm using Joomla 1.5.9
Below is the code in Form HTML
Below is the code of the external php file "insert.php"
but make <form> tag in Form HTML box cause error message "You are not allowed to access this URL " in frontend.
I know many people encounter this problem and I can't find a solution for this.
I'm using Joomla 1.5.9
Below is the code in Form HTML
<form action="insert.php" method="post">
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
<input type="submit" />
</form>
Below is the code of the external php file "insert.php"
<?php
$con = mysql_connect("localhost","root","abcdef") or die("failed connect" . mysql_error());
mysql_select_db("joomla_db", $con);
$sql="INSERT INTO profile (firstName, lastName) VALUES('$_POST[firstname]','$_POST[lastname]')";
if (mysql_query($sql,$con)){
echo "1 record added";
}
else{
echo "failed send";
}
mysql_close($con);
?>
Hi Dhlao,
Sorry, I wasn't clear - paste the code inside the <form . . .> and </form> tags but not the tags themselves.
ChronoForms creates it's own form tags, and form tags cannot be nested inside other form tags.
Your Form HTML should be
Please see the Tutorials in the DownLoads area here.
Bob
.
Sorry, I wasn't clear - paste the code inside the <form . . .> and </form> tags but not the tags themselves.
ChronoForms creates it's own form tags, and form tags cannot be nested inside other form tags.
Your Form HTML should be
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
<input type="submit" />
You could also insert the code from your external file into the OnSubmit After box. But you don't need to - ChronoForms will do the database save for you, into a new table if you use the Create Table icon, or into an existing table using the Database Connection tab. Please see the Tutorials in the DownLoads area here.
Bob
.
This topic is locked and no more replies can be posted.