Not signed in (Sign In)

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

  1.  
    All of our FA forms are embedded in our site using the WP plugin. However, I'd love to populate the forms using custom links with pre-fill data sent out through Salesforce. Any thoughts on how to do this? I saw the link on doing this with regular forms.
    • CommentAuthordbuschho
    • CommentTimeSep 8th 2010
     
    Hello Will,

    I believe replacing line 83:
    -----
    if(!isset($_GET['tfa_next'])) {
    $buffer = file_get_contents("http://app.formassembly.com/rest/forms/view/".$tag['attributes']['formid']);
    }
    -----

    with

    if(!isset($_GET['tfa_next'])) {
    $qs = "";
    if(isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])){$qs="?".$_SERVER['QUERY_STRING'];};
    $buffer = file_get_contents("http://app.formassembly.com/rest/forms/view/".$tag['attributes']['formid'].$qs);
    }

    should do the trick. Basically it drops whatever variables are in the querystring ( url ) into the call to retrieve your form. So if you put:
    http://xxxxx/apply-now?tfa_FirstName=Mike

    then tfa_FirstName=Mike will be passed on to your FormAssembly REST API call:
    http://app.formassembly.com/rest/forms/view/NNNNN?tfa_FirstName=Mike