FORMfields, the premiere web framework
Login
Support Home | Knowledge Base | Documentation | Forums | Contact Us
Info
FORMfields & FORMgen :: Formatting

Inserting Your Form Using an Iframe

(2974 views. Last Updated: 2007-09-20 12:59 PM)

Here is an example of how to dynamically insert your form into an existing webpage. Let's say your form is located at http://www.yourdomain.com/FORMfields/forms/my_form.php and that it has a height of 580 pixels, then you can paste the following code into any HTML page to display the form:
<iframe src="http://www.yourdomain.com/FORMfields/forms/my_form.php" style="width:100%; height:580px; border:none;" frameborder="0"  scrolling="no" />
Note: There are 2 drawbacks to this method:
1. If the height of your form is changed, say by adding a field using FORMgen, then you will have to modify the height parameter in the iframe code.
2. When the user clicks "Cancel" or "Submit" the iframe and not the webpage is redirected. This can be changed by using JavaScript on the form. We are considering adding this option to a future release of FORMgen.
Therefore, we recommend that you instead consider one of the following options for inserting forms on your webpage:
a. Creating a Template For Your Form: http://www.formfields.com/support/viewPosting.php?pi=103
b. Inserting Your Form Statically: http://www.formfields.com/support/viewPosting.php?pi=105
Info
Support | Earn Money
Copyright © 2005-2019 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.