I have got everything working perfectly on these new demo forms and I am scheduled to present it to my client to get them to changeover to your company, from another on-line forum company we are presenting using, since our existing company cannot handle anything over 100 fields. Yours works great, everything fits!
To keep the look of our website consistent I have put these forms into an iFrame within our page. The first one is here: http://www.lynnchadd.com/test_server/lynn_chadd_new_patients_women.html
My challenge is that when I go to test the "save my progress and resume later" feature, it does 2 things: 1) asks me for an email/password and keeps the browser where is last was, within the iFrame (which is perfect) 2) sends people an email with a link to send them back when they want to resume
#2 is the issue, because the link it gives them removes the form from our website entirely: https://www.tfaforms.com/forms/resume/188970?ssl=1
I have searched the forum here for insight on this question and the only thing I found was this reference: http://www3.formassembly.com/forum/discussion/92/save-and-resume-from-hosted-site/#Item_0
I have gone to: http://app.formassembly.com/pages/support/publishing/#restapi
And tried this coding but am having issues trying to make it work inside an iFrame. The existing code that sits within our webpage looks like this: <iframe src="http://www.tfaforms.com/188970" width="100%" height="550" scrolling="auto" name="text" frameborder=0></iframe>
Our server runs php 5, but I have as of yet not been able to get this API code to work: <?php if(!isset($_GET['tfa_next'])) { echo file_get_contents(“http://app.formassembly.com/rest/forms/view/INSERT_FORM_ID_HERE”); } else { echo file_get_contents(“http://app.formassembly.com/rest”.$_GET['tfa_next']); } ?>
I also noticed that within this code it says "http://app.formassembly.com/rest/forms/view" whereas on the "Publish->(RESTAPI)" page it says "http://www.tfaforms.com/rest/forms/view/MY_FORM/"
Which version should I be using? "app.formassembly" or "tfaforms"?
Is there any way to simply edit what link is provided in the email being sent so it could direct them back to: http://www.lynnchadd.com/test_server/lynn_chadd_new_patients_women.html
and not the generic non-company page of: https://www.tfaforms.com/forms/resume/188970?ssl=1
That would by far be the easiest solution from my point of view.
No, we don't allow customization of the save/resume emails.
However, switching to using the REST API should work. The IFrame behavior you see is as expected, as the iframe can not pass information about the referrer back to FormAssembly ... this is a limitation in html iframes.
Can you describe for me why the REST API method isn't working for you? Are you getting some sort of error?
I would recommend using the: http://app.formassembly.com/rest/forms/view/FORM_ID as the REST endpoint.
Ok, my web host is running PHP 5.2.6: http://www.lynnchadd.com/test_server/test.php
However, when I insert the REST API php code into my HTML page where the form should be, that area just appears blank: http://www.lynnchadd.com/test_server/test_api.html
Am I missing something in the instructions? I am not a php coder so perhaps I am doing something wrong? Could it be an issue with the php not running properly in the HTML file? I also tried changing the extension to .php but that just produced blank page: http://www.lynnchadd.com/test_server/test_api.php
I also tried creating a new php file with only the REST API code in it, but that didn't work either: http://www.lynnchadd.com/test_server/api_test.php
However, from your description it sounds to me like you don't have PHP configured quite correctly on your host. If you contact your hosting provider I'm sure they'd be able to point you in the right direction quicker than us, but in order to help further, we'd need a php_info dump. You should also try with just a plain php page something like: echo 'test'; to verify that php is being run on your page.
If your host doesn't have fopen enabled, you should also check to see if they'd allow curl instead.
I will contact our hosting provider for more info. In the meantime, here is the php info page: http://www.lynnchadd.com/test_server/php_info.php
Yes curl is enabled: ------- php info page ------ curl cURL support enabled cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
and fopen is enable: -------- php info page ----- allow_url_fopen On On
On a related question, if I copy/paste the "http://app.formassembly.com/rest/forms/view/188970" into a browser, why does the Main Title, "Women's Medical History Intake Form" disappear? Whereas if I use the "http://www.tfaforms.com/188970" link the Main Title shows up? I am perplexed.
Your html file is not being parsed by php (in chrome) go to this url: view-source:http://www.lynnchadd.com/test_server/test_api.html and you'll see the php directives are remaining unprocessed.
Take the following steps: 1. Change the file extension to .php as you did before.
2. Go into your html file and replace your current code with: <?php if(!isset($_GET['tfa_next'])) { echo file_get_contents('http://app.formassembly.com/rest/forms/view/188970'); } else { echo file_get_contents('http://app.formassembly.com/rest'.$_GET['tfa_next']); } ?>
Note the difference in quotes ... I think you wound up with MS magic quotes somehow ... they cause PHP to choke.
If that still doesn't work, leave the file as .php so I can examine the cause.
The REST api does not display the title as, when embedding a form, there is usually already a title on the page.
Thank you very much for your patience, it finally works!
When I use the "save my progress..." option, the email link sends me back to our website form page, perfect! http://www.lynnchadd.com/test_server/test_api.php
Not being a php coder I didn't realize that using " gives you a blank page, while using ' works just fine. Lots of things to learn yet evidently.
I appreciate all your help with this issue and look forward to doing business with you in the near future!
Hello Darren, " should work fine as well, it's ” that causes the problem. I would have expected php to spit an error about it rather than fail silently ... but here we are. :-)