Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rachael Parker 12 posts 32 karma points
    Jan 08, 2013 @ 17:01
    Rachael Parker
    0

    Contour 3.0 conditional logic not working

    Hi,

    I have a form with two steps/pages. The  first step has some check boxes on it and the  second step's questions should change depending on which boxes where checked on the first page. However whatever I try in the conditional bit for the sencond steps questions makes no difference and all the questions are displayed all the time.

    Is this possible? I can't even get the conditional logic to work on a single page form. Is there something I need to add/do to make conditions work?

    Thanks

    Rachael

  • Greg McMullen 49 posts 195 karma points
    Jan 21, 2013 @ 15:54
    Greg McMullen
    0

    I too am having issues with the conditional logic. It worked prior to us upgrading to 4.11.1 and Contour 3, but now it doesn't work at all.

  • Comment author was deleted

    Jan 21, 2013 @ 16:35

    For the conditions, you need to make sure you are outputting the razor macro and not the usercontrol one (conditions aren't supported by that one).

    Could you tell me if the conditions work when previewing the form from the contour section in umbraco?

    Cheers,
    Tim 

  • Comment author was deleted

    Jan 21, 2013 @ 16:36

    Moved this topic to the Contour forum

  • Greg McMullen 49 posts 195 karma points
    Jan 21, 2013 @ 17:04
    Greg McMullen
    0

    We are using the usercontrols. However, when we had the other razor script active, we couldn't get the form to output.

    This is the code we have for the MvcRenderContourForm.cshtml:

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using Umbraco.Forms.Mvc.Bridge.Html;
    @{
        string action = "ContourForm";
        string controller = "FormRender";
        string formtoken = "UmbracoContourForm";
        string formGuid = Parameter.FormGuid;
    
        @Html.RenderMvcAction(action, controller, formGuid, formtoken, (umbraco.MacroEngines.DynamicNode)Model, (System.Dynamic.DynamicObject)Parameter);
    }
    
    However, even with this code activated in the macro, we are still not getting the conditionals to work OUTSIDE of the "preview."
    Note: This should probably be in the documentation.
  • Comment author was deleted

    Jan 21, 2013 @ 17:06

    @Greg, did you add the scripts? check http://umbraco.com/follow-us/blog-archive/2012/11/9/getting-started-with-contour-30-beta.aspx

    You'll need to add

    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>  
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>    
    <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>   
  • Greg McMullen 49 posts 195 karma points
    Jan 21, 2013 @ 17:39
    Greg McMullen
    0

    A few last questions:

    1) Conditional Support with XSLT? Yes or No? If yes, how?

    2) Our recaptcha is throwing the following error on our site with Razor embed, any suggestions?

    The partial view '/umbraco/plugins/umbracoContour/Views/Fieldtype.recaptcha.cshtml' was not found or no view engine supports the searched locations. The following locations were searched: /umbraco/plugins/umbracoContour/Views/Fieldtype.recaptcha.cshtml

  • Comment author was deleted

    Jan 21, 2013 @ 17:44

    1) Conditional could work if you respect some classes and id's

    2) For recaptcha upgrade to 3.0.7 WIP that has a built in recaptcha field http://nightly.umbraco.org/Umbraco%20Contour/3.0.7%20WIP/

     

  • Greg McMullen 49 posts 195 karma points
    Jan 25, 2013 @ 13:09
    Greg McMullen
    0

    I'm still having an issue with some conditional elements. Namely trying to use a dropdown list to trigger a textfield to appear.

    I notice in the code that the "value" of a menu item is a long string and wonder if this has something to do with it. With that, I used the <option value="xxxx-xxx-xxxx"> code and still couldn't get the conditional to work. I've also tried the value we've entered into the form, no results. 

    Radio buttons will work, but drop downs will not.

  • Comment author was deleted

    Jan 25, 2013 @ 13:22

    @Greg what is the Contour version you are running? Think dropdowns didn't work at first but has been fixed in the mean time

  • Greg McMullen 49 posts 195 karma points
    Jan 25, 2013 @ 13:27
    Greg McMullen
    0

    The package version inside of our Umbraco site says 1.1.11 but I know that's not right. I'm nearly 100% sure it's 3.0.6 since it's (according to the change log) the first version with conditionals.

  • Greg McMullen 49 posts 195 karma points
    Jan 25, 2013 @ 13:30
    Greg McMullen
    0

    And actually, checkboxes aren't working for conditional fields either. Seems like ONLY radio buttons have the ability to do so.

    Edit: Here's the page I'm trying to get working - http://www.rose-hulman.edu/admissions-financial-aid/early-planning/request-info.aspx

    I'm hoping to get the sports (baseball ATM) to reveal fields for position, honors, awards, etc.

  • Comment author was deleted

    Jan 28, 2013 @ 08:51

    From what I can see you are running an older version so upgrading to 3.0.6 should take care of the issue :)

    Cheers,
    Tim 

  • Comment author was deleted

    Jan 28, 2013 @ 08:52
  • Greg McMullen 49 posts 195 karma points
    Jan 28, 2013 @ 13:10
    Greg McMullen
    0

    O..k...that was stupid easy to find, no wonder I didn't know it was there. But you are right, we are on 3.0.1.

    Hopefully this will get us moving now! Thank you.

  • Comment author was deleted

    Jan 28, 2013 @ 14:00

    Great, be sure to clear browser cache after the update since you'll need to be running the new js and the old might be cached in the browser, any other issues just let me know :)

  • Jonas 123 posts 206 karma points
    Sep 09, 2014 @ 10:08
    Jonas
    0

    We are using

    "Umbraco Contour version 3.0.21" and still have this issue. Have tried Razor macro and still checkbox conditions are not working.

Please Sign in or register to post replies

Write your reply to:

Draft