After a bit of fussing around I have figured out how to add forms to a post or page in a Wordpress site.
Add the following code into single.php after the the_content() function:
----start
<?php if(post_custom("form-number")) { // check to see if there is a value in the form-number custom field for the post
$formNumber = post_custom("form-number"); // Create new variable with the posts custom field - form-number $FormAssString = "http://app.formassembly.com/rest/forms/view/"; // add the form assembly uri string to a variable $formNumber = $FormAssString . $formNumber; // add the two variables together to make one string
if(!isset($_GET['tfa_next'])) { echo file_get_contents($formNumber); } // use the vaiable string we created to populate the rest call else { echo file_get_contents("http://app.formassembly.com/rest".$_GET['tfa_next']);}
} ?>
----- end
Read the comments above carefully!
now if you create a custom field called "form-number" (without quotes) in a new post and type in your form id value (have a look at the publish settings for your form):
Your form is publicly available at this address: http://app.formassembly.com/forms/view/44868
So in this case, the form value would be 44868 and that would be your value for the form-value field.
If you need more help with custom fields take a look here:
http://codex.wordpress.org/Using_Custom_Fields
PLEASE NOTE: Your server will need to support the REST api for this to work.