How to Add a Sign-up Form to a Facebook Page
- 1). Open your Facebook page and click "Edit Page" in the upper-right corner. On the edit page, select "Apps" from the left sidebar and scroll down to FBML. If FBML is not enabled, click "Edit Settings," "Add." Once added, click "Go to App" to open the FBML editor.
- 2). Start your form with
<form action="mailto:youremailaddress@domain.com" method="post" enctype="text/plain"> - 3). Create text areas, such as for a name or email address, with
Label Name <input type="text" name="labelname" /> - 4). Create radio buttons, which only allow users to check one of several options, with
<input type="radio" name="options" value="option1" /> Option 1
Repeat this for every option you want to include. You can use check boxes in place of radio buttons by changing the Type field to "checkbox". - 5). Create your Submit button with
<input type="submit" value="Submit" />
End your form with "</form>". You can change the Value to say something else, such as "Send." - 1). Download the Free, Simple, PHP-Based E-mail Contact Form ZIP file from Html-form-guide.com. Extract the files to your computer. The file contains a Scripts folder, a readme file and three documents: contact-form-handler.php, contact-form-thank-you.html and contact-form.html.
- 2). Open the Contact-form-handler.php file in your preferred plain text editor. On the third line, change the sample email address next to "$myemail" to the email address where you want to receive submissions. On line 34, you'll see
header('Location: contact-form-thank-you.html');
Change the location to your Web space; if you have the form information saved at www.yourdomain.com/form/, the location will be "http://www.yourdomain.com/form/contact-form-thank-you.html". Save and close the file. - 3). Copy all the form files except readme.txt and contact-form.html to your Web space.
- 4). Open your Facebook page, and access the FBML by clicking "Edit Page," "Apps," "FBML."
- 5). Open Contact-form.html in your plain text editor. On the 21st line you see
<script language="JavaScript" src="scripts/gen_validatorv31.js" type="text/javascript"></script>"
Modify the Src to reflect where the file is located (for example, "http://www.yourdomain.com/form/scripts/gen_validatorv31.js") and copy this line to the top of your FBML page. - 6). Go to line 27 and change the location of Contact-form-handler.php to reflect its location on your Web space; for example, "http://www.yourdomain.com/form/contact-form-handler.php".
- 7). Copy everything from line 27, which starts the form HTML, to line 55 and paste it into your FBML. Save the FBML page, and visit it on your Facebook page to test your form.