Tutorial: Tell-a-friend with easiForm in Freeway 

 

 

 

 

Home | Buy easiForm | easiForm actions | Contact Us | [1]

 

 

 

 

 

 

 

PHP easiForm v1.7 is a suite of actions to take all the coding out of your web forms in Freeway, * 100% code free *. the PHP easiForm actions can be used to create a Tell-a-friend form in Freeway, this page will show you how.

The 'PHP easiForm' and 'PHP easiCaptcha' actions for use with Freeway will make secure form creation in Freeway a breeze, the actions create the scripts to your preference and then upload them to correct place on your server.

This is a short tutorial showing how quick and simple it is to set up a Tell-a-friend form in Freeway with the 'PHP easiForm' and 'PHP easiCaptcha' actions if you feel you need a CAPTCHA.

Note that easiCaptcha cannot be used with other form scripts unless they are altered for it's use, easiForm is compatible with easiCaptcha.

 

 

 

 

 

 

 

If you just want to set up a form and not a Tell-a-friend then See here

 

 

 

 

*

What do I need to create a Tell-a-friend form using the easiForm in Freeway?

 

 

 

 

 

1# A copy of the 'PHP easiForm' action suite. (If using a captcha then the 'PHP easiCaptcha' action also).

Download the 'PHP easiForm' actions from: The easiBase Freeway actions page.

2# You need a web form page and a success or thanks page, you can put these together in Freeway, use one of the ones in our examples and edit it to suite your needs if you like.

NOTE: The easiForm actions do not create your form page, it just takes all the work out of getting the form to work.

3# A loader file to decrypt the scripts that the 'PHP easiForm' and 'PHP easiCaptcha' actions create, the loader used depends on the system and server type that the form is used on. If you do not have the 'ioncube' decoder folder on your server then you can download one of the action download options that include this folder with loaders for both windows and linux servers.

If you need a loader for another server type such as OSX, FreeBSD, Solaris or other then those loaders can be downloaded from the ioncube loaders download page. If you are unsure as to which loader to use or have other questions you can Download a folder that will check the loader you need, or if you are having problems you can Contact us.

Note: The form page generally needs to end in .php, so this following name would not work: 'myform.html' it would need to be: 'myform.php' or 'somethingelse.php' unless the form page notation is set to be parsed as php on the server you are using your forms on.

5# A copy of Freeway 4 Pro - Softpress

We advise you not to use a Tell-a-friend form on your web site unless it can only be accessed by members who have logged into a members area. If you do use the 'PHP easiForm' action to create a Tell-a-friend form that can be accessed without having to login, then we recommend you also set the 'PHP easiForm' tell-a-friend configuration to send a copy of each tell-a-friend sent to the webmaster. The 'PHP easiCaptcha' does not have to be used with the 'Tell-a-friend' option, we have just shown this for example only.

Two hosting companies that support ioncube loaders are have-host.com (James Wilkinson) and ineedwebhosting.co.uk (David Owen), an added advantage is that both companies owners are also Freeway users.

If there is anything you don't understand or need help with while trying to impliment these actions on your form than feel free to Contact us

 

 

 

 

 

QUICK START GUIDE: A Rapid guide to adding a Tell-a-friend form using the 'PHP easiForm' actions and Freeway.

 

 

 

 

 

If you want to go through each step with explainations and images then go to 'Step 1' after this section, otherwise you can use this short 'Quick start' guide to get your forms up and running without all the added information you you may find irrelevant. If you have not already installed the 'PHP easiForm' action in Freeway Pro 4 'or above' then double click the action file and follow the prompt.
Note that any quotes in the guide or tutorial should be ignored.

 

 

 

 

 

1# Create your Tell-a-friend form page and name it 'somename.php' (note php extension).

 

 

2# Add the form elements and name them (Only naming options: name, friend, email, message and a submit button).

 

 

3# Add the 'PHP easiForm Element' item action to each element.

 

 

4# Add the 'PHP easiForm' action to the 'Submit' button as well. (Not needed on a 'Reset' button).

 

 

5# Add an HTML item above the form elements and add the 'PHP easiForm Errors' item action to it.

 

 

6# Select the 'Tell-a-friend' option in the 'PHP esiForm Elements' action window.

 

 

7# Make sure the form page is selected and then add the 'PHP easiForm' page action.

 

 

8# Select 'Tell-a-friend' from the 'Configuration menu in the 'PHP easiForm' action window.

 

 

9# Enter the 'From email' address which will relect the tell-a-friend was sent from.

 

 

10# Select 'Reload form' from the 'Action on success' menu.

 

 

11# Select 'Edit' for 'Tell-a-friend content' and enter your tell-a-friend email content.

 

 

12# Upload the 'ioncube' folder to the root or home folder on your server using an ftp client'

 

 

13# Select 'Upload' from Freeway and then enter the URL of your form page into a browser.

 

 

 

 

 

OK, if you have done the above you should be up and running.

You can read on if you want to go through each step with images and more detailed information.

 

 

 

 

 

*

Step 1: Build the form layout:

 

 

 

 

 

Build your form by placing the different elements on the page and positioning them as you want.

If you are using Tell-a-friend then there are only specific field names available to you.

name - For the name of the person sending the t-a-f.
your_name - Same as name but one or the other.
friend - For the name of the person the t-a-f is sent to.
email - For the friends email address to send the t-a-f to.
message - For any message the sender might add to the t-a-f.

Note: You can use a submit button for your form or use an image as the submit button, whichevery you need the process is the same with the 'PHP easiForm' action suite.

OK, the t-a-f page has it's elements apart from one, move on to Step 2 to add that element...

^-- Top

tafstep1

 

 

 

 

*

Step 2: Add an HTML item for the user error text:

 

 

 

 

 

The other element we add is a HTML item, we place it at the top of the other form elements and this will be used for the text to alert the user to any error they made on the form.

Select the 'Tell-a-friend' option from the 'PHP easiForm Element' action window.

Note: If you are using a table then a cell can be used for the error text, you will just treat the cell the same as the HTML item as directed in the next step.

Tip: You can also add a style to the HTML item or cell while it is selected, that way the error text returned will be styled relatively to the style you set it to. You should add styles to any other element that has text, then again the text will be styled relativly.

Move onto next step...

^-- Top

tafstep2

 

 

 

 

 

 

 

 

 

While we are here we may as well add an instance of the 'PHP easiForm Errors' item action. We add this action while the HTML item 'or cell' is selected:

Item > Actions > PHP easiForm Errors

This action will add some code to the selected item that outputs any error the user might make if maybe not filling in a REQUIRED value on the t-a-f form.

You can set some default text for when the t-a-f page first loads and also for when the t-a-f has been sent successfully. The latter will only be used if you have selected to reload the form from the 'Action on success' menu in the 'PHP easiForm' action window, you will read about this below.

OK, moving on to Step 3...

 

^-- Top

tafstep3

 

 

 

 

 

*

Step 3: Add the PHP easiForm action:

 

 

 

 

 

Now we add the 'PHP easiForm' action to the form page, so select the form page and then add the action:

Page > Page Actions > PHP easiForm

Now that you have added the 'PHP easiForm' action to your page you will need to select 'Tell-a-friend' from the 'Configuration' menu and enter the 'From email', this is the email address the form will appear to have been sent from.

The 'Perform POST on easiForm variables' checkbox is selected by default and will add code to retreive the values of the passed variables.

OK, while we are here we need to select a couple of other options in the actions palette, so onto Step 4 for this...

^-- Top

tafstep4

 

 

 

 

*

Step 4: Set some more options in the PHP easiForm action palette:

 

 

 

 

 

OK, you should have already entered the 'From email' in the last step, if not then enter it now.

'Act on success' Set this to 'Reload form'.

'Send a duplicate copy....' Select to send a copy to another address, this can be used to track any t-a-f messages that have been sent but you will also need to add a 'Send to' address to use this option.

'Required values' Enter any of the form element names into this field that you want the user to enter or select values for. (We haven't got to naming the elements yet but we will on the next step)

'Sublect' A subject for your form message sent to the recipient.

'Tell-a-friend content' You personal message for the t-a-f. There are several place markers available for this content, use the 'Assist' button for more information on this.

This action will create the easiForm_mail and easiForm_config scripts that Freeway will upload to your server. It will also take care of the forms '<form action=' and '<form method=' values. The '<form action=' will be set to point to the same page as the form 'to it'self' and the '<form method=' to POST.

OK, onto Step 5 to name the form elements...

^-- Top

tafstep5

 

 

 

 

*

Step 5: Name the Tell-a-friend form elements:

 

 

 

 

 

 

Generally Tell-a-friend forms have an email field and possibly also a name field for the senders name, with 'PHP easiForm' there are a few other field names available, we have mentioned these in Step 1 but here they are again:

name - For the name of the person sending the t-a-f.
your_name - Same as name but one or the other.
friend - For the name of the person the t-a-f is sent to.
email - For the friends email address to send the t-a-f to.
message - For any message the sender might add to the t-a-f.

Go through each element on your form and give it a name, the above are the only options available in a t-a-f form.

The friends e-mail field should be called 'email'.

OK, onto Step 6...

^-- Top

tafstep6

 

 

 

 

 

*

Step 6: Add the PHP easiForm Elements action to each of the Tell-a-friend form elements:

 

 

 

 

 

Select each form element including the Submit button and add the 'PHP easiForm Elements' action to it. If you need to use an image as a submit button then you just do this by adding the 'PHP easiForm Elements' action to the image and it will be converted to a button.

This action will change the name and value of the element it is applied to, you will not see these changes in Freeway but they will exist in the code Freeway produces. For example, if you name a text field element as 'your name' the 'PHP easiForm Elements' action will change it's name to 'f[your_name]' and set the value to '$f[your_name]'.

When applied to a submit button the button name will be set to 'submit' and the value set to whichever value you have set, if you have not set a value then it will be set as 'Submit'. This action will override any name you give the Submit button but you can change or set the button value to whatevery suites your form.

Onto Step 7...

^-- Top

tafstep7

 

 

 

 

 

*

Step 7: What the final form looks like::

 

 

 

 

 

 

OK, if you followed the above steps your form should look something like the image to the right. You do not need to add all the different fields we have used in this example, you can just use an 'email' field, or you could also have added a 'message' text field or textarea as well as the options we have used, it's up to you.

If you did use a 'message' textarea with your t-a-f then you can add default text to that also, simply be entering the text in the 'Value' feld. To do this select the 'message' text area and then enter the default text that you want to appear when the form first loads into the 'Value' field in the inspector palette.

Now when you publish your form the actions will add any of the code needed to use easiForm into the page html code.

You can now upload the website to your server using Freeway, any relavent scripts created by the 'PHP easiForm' action will also be uploaded by Freeway.

Last step, onto Step 8...

^-- Top

tafstep8

 

 

 

 

 

*

Step 8: The 'ioncube' folder:

 

 

 

 

 

 

Basically everything is done on your Tell-a-friend form side but one thing does still remain if not already undertaken, the server that hosts your form or forms will need a copy of the 'ioncube' folder to be uploaded to the root or home directory. You will probably find this 'ioncube' folder was included in the download of the PHP easiForm actions, if not you can download it from here: ioncube loaders

Once you have done this you should find your tell-a-friend form will be up and running. A license file is needed to remove any demo alerts from your form, if and when you receive the license file for the domain that your forms are being used on you should upload it by FTP to the same directories as any of your forms using the PHP easiForm actions.

If you want to add a math or image CAPTCHA to your form then there is the 'PHP easiCaptcha' action for this purpose, now your captcha can be added to your easiForm simply by adding one instance of the action to an item on your form. If you want to see how to add the 'PHP easiCaptcha' action to your Freeway form that uses the 'PHP easiForm; actions then read on...

 

*

Optional Step 9: Adding PHP easiCaptcha action to your Freeway Tell-a-friend form:

 

 

 

 

 

 

To add a captcha to your Freeway form is very simple with the 'PHP easiCaptcha' action. In this Step 10 we add a Math type captcha to the form you have just created.

Add an HTML item just below it. (Add some text to ask the user to answer the math question if you fell it to be more informative.)

OK, lets move onto next image in this step below...

tafstep9

 

 

 

 

 

 

Now with the HTML item selected add the 'PHP easiCaptcha' item action to it, your form should now look like the image to the right.

Now select 'Math' from the 'PHP easiCaptcha. action palette and make any changes in the selections if needed.

If using a table for your form the 'PHP easiCaptcha' item action could actually be applied to a cell between the text and the Submit button.

Tip: Don't forget to select and add a style to the HTML items so the text will be styled to suite your form. Add a style to the HTML item or cell that has the 'PHP easiCaptcha' item action as there is text output there also.

Well that's it, you just need to upload the site to your server with Freeway and all the relative scripts will be created and upload.

If you want to see how to use an Image captcha rather than a math captcha then read on...

tafstep10

 

 

 

 

 

 

To change the captcha type from a Math to an Image captcha then simply select 'Image' from the 'Captcha type' menu. There are a different set of options available, make any changes if you feel you need to. Upload the site to the server again and your form will have an image captcha.

The action will place the 'easiCaptcha' field for the user entered image text just below the image, if you want to place this field in a different position then select the 'I will be inserting the text field manually' checkbox and you can then place a textfield for the captcha text where you like.

Note: If you add the easiCaptcha field yourself then this field needs to be given a name of 'easiCaptcha' case sensitive and without the quotes, do not enter a value. You do not need to apply the 'PHP easiForm Elements' action to it as this easiCaptcha field.

All done apart from uploading it to the server.

Good luck with your forms.

tafstep11

 

 

 

 

 

 

 

 

 

The easiForm actions have quite a lot of spam protection built in but adding a math or image easiCaptcha to this will make your forms even more secure. easiForm and easiCaptcha are available as a bundle and the same licenses cover the Freeway actions.

A license for easiForm is $20 per domain (Not IP Address) or $30 as an easiForm and easiCaptcha or easiCaptchaM bundle, this allows as many copies of easiForm to be used on the same domain it is registered for. Once bought a license cannot be used for any other domain than the one it has been registered for.

 

 

 

 

 

^-- Top

 

 

 

 

 

 

 

 

Freeway 4 Pro PHP easiForm and PHP easiCaptcha examples here.

 

 

 

 

 

 

 

 

 

Copyright © Mike Brackenridge 2006 - 2024 || Freeway is a registered trademark of Softpress Systems Limited.

 

 

 

 

+