Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorlynnchadd
    • CommentTimeFeb 15th 2011
     
    Hello,

    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.

    Thanks for any insight you can provide.

    Darren (on behalf of Lynn Chadd)
    • CommentAuthorlynnchadd
    • CommentTimeFeb 16th 2011
     
    I had another thought...

    when you go to "save my progress...", is there any way to just remove the email being sent out... but keep the in-browser login?

    Thanks

    Darren (for Lynn Chadd)
    • CommentAuthordbuschho
    • CommentTimeFeb 16th 2011
     
    Hello,

    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.

    Happy to help further,
    FormAssembly.com Support
    • CommentAuthorlynnchadd
    • CommentTimeFeb 16th 2011
     
    Hello,

    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

    -------- code added --------
    <?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']);
    }
    ?>
    -------- end code ---------

    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

    Any help would be appreciated, thanks!

    Darren
    • CommentAuthordbuschho
    • CommentTimeFeb 17th 2011
     
    Hello Darren,

    I can't seem to access the page you referenced.

    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.

    Happy to help further,
    FormAssembly.com Support
    • CommentAuthorlynnchadd
    • CommentTimeFeb 17th 2011
     
    Hello dbuschho,

    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.

    The quest continues...

    Darren
    • CommentAuthordbuschho
    • CommentTimeFeb 17th 2011
     
    Hello Darren,

    I think I see the problem now,

    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.

    Happy to help further.
    • CommentAuthorlynnchadd
    • CommentTimeFeb 18th 2011
     
    Hello dbuschho,

    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!

    Have a good weekend,

    Darren
    • CommentAuthordbuschho
    • CommentTimeFeb 18th 2011
     
    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. :-)

    Sorry I didn't notice sooner,
    FA Support.