Not signed in (Sign In)

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

    • CommentAuthorferrariaz
    • CommentTimeSep 15th 2009
     
    I'm having trouble getting my redirection code to work properly. No matter how I format it, it goes to the first URL, regardless of selection. Here's the code ("mysitedomain.com" is just a replacement for the real domain for this post):

    @IF(tfa_Chooseyourpage=tfa_Page1, "http://mysitedomain.com/register-other.html",
    @IF(tfa_Chooseyourpage=tfa_Page2, "http://mysitedomain.com/register-judged.html"
    ))

    What am I doing wrong? It always goes to "register-other.html" regardless of my selection. This is just a simple, single field test form with a "Choose your page" drop down with "Page1" or "Page2" as the only options. The real form is more complex, but I can't even get this to work. Thanks in advance.
    • CommentAuthorferrariaz
    • CommentTimeSep 15th 2009
     
    I forgot to mention that I have the Professional account and, in fact, this is the sole reason that I chose that account. It's very important that I'm able to make this work and as soon as possible.
    • CommentAuthordbuschho
    • CommentTimeSep 16th 2009
     
    Hello, the proper syntax for your test formula was:

    @IF(%%tfa_Chooseyourpage%%="Page1", "http://2009concorsoarizona.com/register-other.html", @IF(%%tfa_Chooseyourpage%%="Page2", "http://2009concorsoarizona.com/register-judged.html" ))

    where you have %%-%% around your field aliases, and your drop down values are encapsulated in quotes. What I find to be a good technique is to first put my variables individually, along with a copy of my redirect formula, into the 'thank you' page box, so that when I test my form, I can see the variable values and see if they are producing the expected results. Once they are all working properly, then I move the formula into the redirect box.

    Please let us know if you need further assistance,
    FA Support.
    • CommentAuthorferrariaz
    • CommentTimeSep 16th 2009
     
    I'd actually tried including the quotes and "%%", but it didn't work. Turns out my real issue was including the "fta_" prefix on the drop down values (figured it out from your code). Thanks for the help.
  1.  
    FA Support,

    I'm having similar issues and wondering if you can help. I'm trying to redirect the user to 1 of 3 urls based on their selection from the "tfa_Iwouldlikepublic" field. The values for that field are: tfa_A, tfa_B and tfa_C.

    Here's the form:
    http://www.tfaforms.com/139606

    I started with this syntax, following the instructions to the letter (I believe):

    @IF(%%tfa_Iwouldlikepublic%%="tfa_A", "http://www.toolkitA.com", @IF(%%tfa_Iwouldlikepublic%%="tfa_B", http://www.toolkitB.com, @IF(%%tfa_Iwouldlikepublic%%="tfa_C", "http://www.toolkitC.com", "http://www.toolkit-default.com" ))

    (Obviously the urls are not real)

    This didn't work. At first it redirected me back to http://app.formassembly.com/forms/. Now it goes to http://www.tfaforms.com/responses/processor and throws a Page Not Found (404) error.

    Based on the string above, I experimented with removing the "tfa_" part of the variables:

    @IF(%%tfa_Iwouldlikepublic%%="A", "http://www.toolkitA.com", @IF(%%tfa_Iwouldlikepublic%%="B", http://www.toolkitB.com, @IF(%%tfa_Iwouldlikepublic%%="C", "http://www.toolkitC.com", "http://www.toolkit-default.com" ))

    That produced the same (incorrect) result.

    So then I tried removing "tfa_" from the field name too:
    @IF(%%tfa_Iwouldlikepublic%%="A", "http://www.toolkitA.com", @IF(%%Iwouldlikepublic%%="B", http://www.toolkitB.com, @IF(%%Iwouldlikepublic%%="C", "http://www.toolkitC.com", "http://www.toolkit-default.com" ))

    This time I'm directed to an error page: "Fatal error: Call to a member function setValue() on a non-object in /var/www/app.formassembly.com/vendors/phpexcel/PHPExcel/Calculation/FormulaParser.php on line 519"

    I've double-checked the field name and the variable names, and they're correct. I'm on the Pro plan.

    Help.

    Thanks.
    • CommentAuthordbuschho
    • CommentTimeMar 2nd 2010
     
    Hello,

    Here is the correct formula ( which I've placed into your form ):

    @IF(%%tfa_Iwouldlikepublic%%="A", "http://www.toolkitA.com", @IF(%%tfa_Iwouldlikepublic%%="B", "http://www.toolkitB.com", @IF(%%tfa_Iwouldlikepublic%%="C", "http://www.toolkitC.com", "http://www.toolkit-default.com" )))

    The differences from the original are:
    1. The comparison is done against the label (A) of the option, not the value (tfa_A). I believe this is correct in the documentation, but please let us know where it is unclear. We argued back and forth on which users would prefer so some of our examples may not be as clear as they could be.
    2. The formula you had originally lacked a closing parenthesis ')'. Do you think a syntax checker would help users like yourself out?
    3. Your second destination string:
    http://www.toolkitB.com
    was placed into the code without quotes to indicate that it is a string.

    Happy to help further if you run into problems,
    FA Support.
  2.  
    Hi there,

    Thanks for the fast response.

    I understand the corrections you made, but something still is working right. If you try the form, it doesn't redirect after submission. It goes to http://www.tfaforms.com/responses/processor and throws a 404 page.

    Given the very specific syntax, a checker would probably help, I'm sure.

    I guess it's not that the documentation is wrong, per se, but could certainly be more specific. Here's what it says:

    ----------
    In the "redirect to this page" field, instead of typing in the web address (URL) of the page, enter a formula. The syntax should look like this:

    @IF(%%field%%="value_1", "http://your.site.tld/page_1.html",
    @IF(%%field%%="value_2", "http://your.site.tld/page_2.html",
    @IF(%%field%%="value_3", "http://your.site.tld/page_3.html",
    "http://your.site.tld/default_page.html" )))

    Further, the directions explain that "value_1" is "The expected value. If you are testing a multiple-choice field, you must enter the choice value. To find the choice values for an alias, click on the link at the bottom of the Notifications tab."
    ---------

    Referring to the "value" can be interpreted as either the field label (A) or the field value (tfa_A). In your own message above, you refer to the "value" as "tfa_A", yet from your notes it's obvious that the instructions intend the "value" that's passed into the string to be the field label and not the value. You see the confusion?

    Perhaps being more explict may help users:

    "The field label that is chosen by the form user. If you are testing a multiple-choice field, you must enter the choice value. To find the choice values for an alias, click on the link at the bottom of the Notifications tab. This is NOT the field value (e.g. tfa_value_1) but the field label (e.g. value_1)."

    Anyway ... if you could let me know what you think may be up with the processing of the redirection syntax, I'd appreciate it.

    Thanks,

    Dan
  3.  
    Looks like it works okay in Firefox and Chrome, but does not want to work in IE. I tested in IE 6 & 7. Dumped the cache. Same result each time in both versions.
    • CommentAuthordbuschho
    • CommentTimeMar 2nd 2010
     
    Ah, I think we're hitting some of IE's weird redirect rules. It does things a little different from other browsers, esp when dealing with redirects. I tried replacing the values you provided with working urls, and it seems to work now in IE.

    Can you double check me?
  4.  
    Perfect, thanks! Works great. Smart of IE, I guess, but frustrating for developers.

    That may be worth calling out in the instructions. I think a developers first inclination is to test with a bogus url vs. a real one.

    Thanks for the quick support.