1 of 2
1
Creating a New Form
Posted: 19 May 2008 02:59 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2008-05-05

This is for all newbie users - like myself - who stumbled on one fundamental thing: creating a new form. It seems like there’s nothing in the docs that explicitly tells you how to create a new form. This is not entirely true...there is a line in the docs that says that form are dynamically generated. It’s easy to breeze past this line, but here’s what it means:

1. You don’t have to create a new form in the Freeform admin page per se. Just make the form you need on the page where it needs to be made, and name it something unique.

2. you don’t need to create a new field set for each form. All fields are available to all of your forms.

Freeform (and, IMO, EE in general) are exceptionally easy to use...so easy, in fact, that it surprises me how few hoops I need to jump through to get something done. Often when something stumps me I discover that I’m trying to do “too much.”

In spite of my not insigificant experience (7 years of experience with EE and pMachine, and I am currently running sites in both pM and EE) I have struggled with this “creating a new form” question for a week before I took the Zen approach and just let it go… grin

Thanks!

Profile
 
 
Posted: 19 May 2008 08:28 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

SISU,

All these years I’ve been astounded how patient people have been with the lack of really good documentary and example support of our software. Every weekend I seem to say, I’ll start fixing the problem this weekend, but by the end of the weekend I have written a new module or something instead of supporting the old. And here we are, a couple of years later.

Thanks for hanging in there.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 20 May 2008 08:03 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

SISU,

Thank you for the input....
I’ll make sure I this information to the Docs smile

I’ve been very slowly tugging at the Docs here and there… it’s been my goal to overhaul the Docs in the near future smile

 Signature 
Profile
 
 
Posted: 23 May 2008 01:42 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  7
Joined  2005-10-28

Docs. That’s good news. I’m a newbie here, too. Here’s what I’ve learned so far (many thanks to SISU, too for the Go For It encouragement). I’ve written docs, before, so consider this my payPal contribution. smile

Get started by creating a form.
Freeform allows you to store information submitted via forms, but at its simplest, you can create a form that will be emailed to you.

This example takes a basic contact form with name, email address, phone number, and adds to it.

This example takes the basic EE email module’s contact form and expands on that (The EE mail module, contact form is documented here).

Here is sample EE code for a basic contact form: This is what you’d put in an EE template:

{exp:email:contact_form user_recipients="false" recipients="name@address.com" charset="utf-8"}
<p>
I'd like to know more. Please contact me about your services.
</p>

<label for="name">Name</label>
<input type="text" name="name" id="name" />

<label for="from">Email</label>
<input type="text" name="from" id="from" />

<label for="message">Phone (with area code)</label>
<input type="text" name="message" id="message" />

<input type="hidden" name="subject" value="Contact Via Web Site " />

<p>We will not share your info with anyone. Period.</p>
<input name="Submit" type="submit" value="submit" />

{/exp:email:contact_form}

What do you need to change to adapt it for Freeform?

Change the opening and closing tags from { exp:email:contact_form } to { exp:freeform:form }

In the opening freeform tag, here’s what else you need to do:

1. Add a form name. I’ll call mine site_lead since this is a lead generated from the web site.
2. Who gets the email? change “recipients” to “notify”

In the body of the form, you need to make some changes. Freeform comes with more pre-defined form fields. Check out the list of options in the Control Panel:
Control Panel > Modules > Freeform > Fields Tab.
All the fields are available for this name/email/phone number contact form.

1. “name” stays the same
2. “from” (EE) changes to “email” (FF)
3. “message” (EE) changes to “phone1” (FF)

4. Oh yeah. You can take out that hidden form field “subject”—it was required for EE, but Freeform works differently.

Here is the new (adapted) Freeform template:

{exp:freeform:form form_name="site_lead" required="name|email|phone1" notify="name@address.com" template="default_template"}
<p>
I'd like to know more. Please contact me about your services.
</p>

<label for="name">Name</label>
<input type="text" name="name" id="name" />

<label for="email">Email</label>
<input type="text" name="email" id="email" />

<label for="phone1">Phone (with area code)</label>
<input type="text" name="phone1" id="phone1" />

<p>We will not share your info with anyone. Period.</p>
<input name="Submit" type="submit" value="submit" />

{/exp:freeform:form}

Save the template, preview the page, fill out the form, and click the submit button.

Here’s the default email that was sent:

Subject Line: Someone has posted to Freeform

Someone has posted to Freeform. Here are the details:

Entry Date: 2008-05-23 12:18 AM
Attachments: 0
Form Name: site_lead
Name: Mortimer Schnerd
Email: senderemail@someaddress.com
Phone 1: 800.000.0000

Let’s create a new template and customize it to compose a better email notification

1. Click the Templates tab in the Freeform module.

All that’s there is the default template. You can’t change it, so instead…

2. Click the Create New Template button.

The page refreshes to display a form for you to adapt (My markings in bold; remove spaces between brackets):

Template Name (single_word_no_spaces!): contact_form
Template Label: (can have spaces): Contact Form
From Name: (Name of sender): { name }
From Email: (Email of sender): { email }
Email Subject Line: Web Site Response: Request for more info
Word Wrap and HTML (choose how you want to receive email)

Email Message:

{name} has requested more info about the company.

Here are the details:

Date of request{entry_date}
Name
{name}
email address
{email}
Phone number
{phone1}

3. Save the template.

4. Now, put the template name (contact_form) into the contact form template. Here’s the altered first line of the freeform opening tag:

{exp:freeform:form form_name="site_lead" required="name|email|phone1" notify="name@address.com" template="contact_form" }

There you go. Friendlier, more customized email notification. That should get you started.

Profile
 
 
Posted: 23 May 2008 06:44 AM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Thank you for the contribution AuntiAlias smile

 Signature 
Profile
 
 
Posted: 10 June 2008 08:28 AM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  6
Joined  2007-07-27

Where do you put the subject line?

Profile
 
 
Posted: 10 June 2008 02:41 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

grantmx,

The Subject line is configured in the Freeform CP when building the notification template smile
You’ll see a field called “Subject”

 Signature 
Profile
 
 
Posted: 21 August 2008 07:36 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  1
Joined  2008-08-18

Thank god for forums - the “documentation” for freeform not only tells you nothing useful about how to use it, it also doesn’t link to these forums or anywhere else of any relevance. How long would it take to add a few helpful links to the page??

Thanks for the module anyhow, I’m sure it will help me a lot once I read this thread and figure out how to use it. By the way, finding out where to download it was also a challenge, albeit a smaller one than finding this info.

Profile
 
 
Posted: 19 October 2008 05:18 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  19
Joined  2008-06-23

I’m just about to create a form for a client and still have no idea what to do first as I’ve never made a form before. the only thing I’ve done is use the contact form from EE and copied the example code and tweaked for style. Now however I need 27 fields + 3 upload fields.

AuntiAlias said:

In the body of the form, you need to make some changes. Freeform comes with more pre-defined form fields. Check out the list of options in the Control Panel:
Control Panel > Modules > Freeform > Fields Tab.
All the fields are available for this name/email/phone number contact form.

but when I went there I don’t see any pre-defined form fields - it’s just blank. Looks like I need to start from scratch. If so, that’s fine, but I have no idea where to go from here.

All help greatly appreciated.

Profile
 
 
Posted: 20 October 2008 06:15 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18
Create Sean - 19 October 2008 05:18 AM

but when I went there I don’t see any pre-defined form fields - it’s just blank. Looks like I need to start from scratch. If so, that’s fine, but I have no idea where to go from here.

Hey Sean,

There should be several fields there by default…
You’re for sure in the “Fields” tab? smile

CP Home › Modules › Freeform › Manage Fields

I would try an unistall/reinstall if it’s not showing.

Regardless, adding new fields are easy smile
At the top right hand side of that page, you’ll see a green button that says “Create a New Field”
Click it, and similar to creating custom weblog fields, you follow the routine, though much simpler. smile

Let me know if you’ve made it this far

 Signature 
Profile
 
 
Posted: 20 October 2008 06:51 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  19
Joined  2008-06-23

uninstalling and reinstalling fixed that.

tomorrow, I’ll dive into this, now it’s time for bed.

Profile
 
 
Posted: 24 November 2008 08:46 AM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  4
Joined  2008-11-21

I am beyond frustrated at this point. I have been trying to set up a simple form in expression engine with freeform and everything post fine inside the module but does not email me. I decided to follow this example and this basic example does not even work. Any ideas as to why this is not working for me, please let me know!

<body style="background-image: none; color: white; background-color: black;">
{exp:weblog:entries weblog="resources" limit="1"}
 
<div style="padding: 10px" id="content">
  <
div id="maincontent">
   <
div id="left_side">


{exp:freeform:form form_name="form" required="name|email|phone1" notify="[removed]" template="default_template"}
<p>
I'd like to know more. Please contact me about your services.
</p>

<label for="name">Name</label>
<input type="text" name="name" id="name" />

<label for="email">Email</label>
<input type="text" name="email" id="email" />

<label for="phone1">Phone (with area code)</label>
<input type="text" name="phone1" id="phone1" />

<p>We will not share your info with anyone. Period.</p>
<input name="Submit" type="submit" value="submit" />

{/exp:freeform:form} 



</body>

</html>

Profile
 
 
Posted: 24 November 2008 09:10 AM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Nate,

For simplicity’s sake, go even simpler…
Place ONLY this code in a template smile

{exp:freeform:form form_name="solspace_test" required="name|email" notify="your_email@something.com" template="default_template"}

<label for="name">Name</label>
<
input type="text" name="name" id="name" />

<
label for="email">Email</label>
<
input type="text" name="email" id="email" />

<
input name="Submit" type="submit" value="submit" />

{/exp:freeform:form}

 Signature 
Profile
 
 
Posted: 24 November 2008 11:02 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  4
Joined  2008-11-21

Ok, so here is the latest. Apparently I am getting the emails it is just on a very large delay. Is this normal for everyone else or is there a setting somewhere in the cp that sets the delay to email the form. I submitted the form and then about an hour and a half later I received the email. Any ideas on what is happening here. It obviously makes it really hard to troubleshoot if I only get the emails nearly 2 hours later. Please help, thanks!

Profile
 
 
Posted: 24 November 2008 01:17 PM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Nate, there’s a good chance it’s your webhost… I’d contact them smile
Also, which Emailing method are you using in your System Configuration?

CP Home › Admin › System Preferences › Email Configuration

 Signature 
Profile
 
 
Posted: 24 November 2008 01:19 PM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  4
Joined  2008-11-21

I am using php. I’ll check into my webhost. I don’t even know what I should ask them. Is there a way to phrase it intelligently?

Profile
 
 
   
1 of 2
1