Insert Web Form in Typo3

Arclab® Web Form Builder

Build the Form (php File)

First create the form in Arclab Web Form Builder and then click on "Build Web Form".

 

Build Web Form

 

Save the file and upload it (using FTP) to the root directory of the Typo3 installation. If you select a subdirectory, you will need to adjust the path later.
In this example we use the filename "webform.php".

The form (php) file is now in the Typo3 root folder, so the path is: /webform.php

If you save it to e.g. the subfolder /forms, the path is /forms/webform.php

Log into Typo3

Log in as a user of the role "Administrator", e.g. "admin" (or "root" depending on your installation).
Please note that restricted users might not be allowed to insert javascript code, so they can not insert the form.

 

 

Add a "New content element" to Typo3 Page

Add a "New content element" to your page and click on "Regular Text Element":

 

Regular Text Element

 

 

Change the "Type" to "HTML"

Change the content element "Type" from "Text" to "HTML" (in "Special"):

 

Change Type to HTML

 

 

Copy/Paste the Javascript Code

The form will be integrated into the Typo3 "Content Element" via Javascript code:

 

<div id="awf-form"><script>var c=new XMLHttpRequest();c.open('GET','/webform.php?js=awf');c.onreadystatechange=function(){if(c.readyState===4&&c.status===200){var s=document.createElement('script');s.innerHTML=c.responseText;document.head.appendChild(s);awf_Run('awf-form');}};c.send();</script></div>

If you have copied the Javascript code directly from the program, you must change the path from "webform.php" to "/webform.php".
This is necessary because of the Typo3 page structure and the use of virtual folders.
If you have uploaded the form (php) file to a subfolder, e.g. "/forms", then you need to change it to: "/forms/webform.php".

 

Copy and paste the code into the Typo3  HTML editor:

 

Copy and Paste Javascript Code

 

Finally "Save" the page and check if the form is shown correctly.

 

 

If the form is not shown correctly:

  • Are you logged in as user of the "Administrator" group?
  • Have you switched the "Type" to "HTML"?
  • Have you uploaded the form (php) file to the correct folder?
  • Is the path (in the javascript) to the form (php) file correct?