OK great , its much better now.. I installed this couple month ago….
I use for all my site contact form, is not plugin or module.., but think some feature will be OK for future Form module.. if interested to others
Here is source code if someone want to implement oh his site…directly
This is ANTI SPAM Contact form without captcha, so you can be sure that there will be no more Contact form spam… And Captca make problem to people when submiting forms, so its better without it…
when someone submit form he get HTML template mail, with info he submited…. and admin of site too…
HTML email template can be styled what ever way you want…
And that will be great feature for future FORM module…
If you need help implementing it, just let me know
This is php contact form but i think it can be implemented for comments too…with some modifications… ( there is no need for conifrmation)
Ther is a javascript that check all browsers, proxies and some more things , so people cant use autosubmitters..
I use it for couple months and there was not one contact form SPAM….
I used some with capcha before… and got it form time to time.. SPAM but this way work great = NO SPAM
There is a one txt file that I put in EE, i made new template with php enabled… and put that code in and then embed it in template that want to show in , and other i just upload on root or whatever you want..
on second contact.php file you can customize HTML template mail… and redirection
I’ve a question about freeform. It work flawless with <input type=text>, but how do I get information out of a text-area field? When I do that, I just got the first 50 characters of the message , the rest is not available in the freeform module section.
I use the latest version and the code I use is:
{exp:freeform:form form_name="contact" required="name,email,message" notify="your@your-site.com" return="{path='{template_group}/index'}"}
<fieldset>
<legend>Contactform</legend>
<table border="0">
<tbody>
<tr>
<td valign="top" nowrap="nowrap"><label class="required" for="name">Name</label> </td>
<td valign="top"><input id="name" size="60" name="name" /></td>
</tr>
<tr>
<td valign="top" nowrap="nowrap"><label class="required" for="email">Email</label></td>
<td valign="top"><input id="email" name="email" size="60" /></td>
</tr>
<tr>
<td valign="top" nowrap="nowrap"><label class="required" for="message">Message</label></td>
<td valign="top"><textarea id="message" name="message" rows="5" cols="45"></textarea></td>
</tr>
<tr>
<td> </td>
<td valign="top" nowrap="nowrap"><input type="submit" class="btn" value="Send" name="submit" /> </td>
</tr>
</tbody>
</table>
</fieldset>
{/exp:freeform:form}
IJsbeer:
The original code had this:
if ($edit === TRUE)
{
// Update the entry in exp_freeform_fields
$DB->query($DB->update_string('exp_freeform_fields', $_POST, 'field_id='.$_POST['field_id']));
// Update column in exp_freeform_entries
$DB->query("ALTER table exp_freeform_entries change ".$_POST['name_old']." ".$_POST['name']." text NOT NULL");
}
else
{
$DB->query($DB->insert_string('exp_freeform_fields', $_POST));
$DB->query("ALTER table exp_freeform_entries add column ".$_POST['name']." text NOT NULL");
}
The new one has this:
if ( $IN->GBL('field_id', 'POST') != '' )
{
//Get old name
$query= $DB->query("SELECT name FROM exp_freeform_fields WHERE field_id = '".$IN->GBL('field_id')."'");
$DB->query( $DB->update_string('exp_freeform_fields', $_POST, 'field_id='.$IN->GBL('field_id')) );
$DB->query( "ALTER TABLE exp_freeform_entries CHANGE ".$query->row['name']." ".$IN->GBL('name')." VARCHAR(50) NOT NULL" );
$message= $LANG->line('field_updated');
}
else
{
$DB->query( $DB->insert_string('exp_freeform_fields', $_POST) );
$DB->query( "ALTER TABLE exp_freeform_entries ADD ".$IN->GBL('name')." VARCHAR(50) NOT NULL" );
$message= $LANG->line('field_created');
}
See the places where varchar(50) are at? Those are the lines to change to TEXT instead.
But, this will also change your default fields to be text too.
There is a second defect: When you add a new field, you aren’t presented with a new field_order value. So if you don’t know what the next available number is, or you leave it blank, 0 is the value that gets saved.
There’s code in EE that gets the next probable field_order value.
It’s done by checking for the value sent in the form - if it is blank or less than 0, do a count of the number of fields:
SELECT count(*) AS count FROM exp_freeform_fields
and increment it by one.
Sorry to stop the music, but I’m having a little trouble installing FreeForm. Is there a trick beyond copying the files to the modules directory in the ‘system’ folder?
I upload the files there but when I go to the Modules tab in my CP I get a message that says “Cannot load /lang.freeform.php”.
What am I missing?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.