Copied to clipboard

Flag this post as spam?

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


  • Neil Hodges 338 posts 987 karma points
    Feb 26, 2013 @ 14:33
    Neil Hodges
    0

    Contour 3.0.6 and User Membership - Update and Create problems

    Hi

    Im using Umbraco 4.11.3.1 and Contour 3.0.6

    I have created users using Contour, this works perfectly apart from one of the fields, a check box field, it wont map to the Mmebrs section when i review a member see screen shot

    See the 'Subscribe to Mailing List' at the bottom of the image.

     

    The second problem is when creating a 'My Account' section within the site to allow the mmebr/User to change certain infomation it is again not mapping the checkbox, and the drop downs, even if the {member.custom} is used in the Default value, see screen shot:

    The front end maps only Textstrings but does not with drop downs or checkboxes.

    Any help on this would be greatly apreciated

  • Comment author was deleted

    Feb 26, 2013 @ 16:39

    For the first one, support for prevalue datatypes has been added since version 3.0.7 

    For the second problem I'll have to check that which I'll do tomorrow morning so I'll report back then :)

  • Neil Hodges 338 posts 987 karma points
    Feb 26, 2013 @ 16:50
    Neil Hodges
    0

    Thanks Tim,

    I apreciate your help. I shall download the new version of Contour ;)

  • Comment author was deleted

    Feb 26, 2013 @ 16:57

    Be aware that one is for umbraco 6, not sure what you are running?

  • Neil Hodges 338 posts 987 karma points
    Feb 26, 2013 @ 17:12
    Neil Hodges
    0

    Ah

    I am running version 4.11.1.3, i asume i shouldn't try to manually upgrade it then?

  • Comment author was deleted

    Feb 26, 2013 @ 17:15

    Nope, more details tomorrow I'll look into the issues then :)

  • Comment author was deleted

    Feb 27, 2013 @ 10:37

    Could you try if the following fixes issue 1:

    https://dl.dropbox.com/u/886345/MemberToolsUpdate.zip

    So just extact and place in your bin overwriting the existing assembly

  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 11:51
    Neil Hodges
    0

    Hi Tim

    nope didnt seem to fix it :(

  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 12:27
    Neil Hodges
    0

    Hi Tim

    I think the first problem is sorted. I was using just a checbox in the Contour form, this i think is why it wasn't mapping correctly in the member section as 'Subscribe to our mailing list' was set as a CheckBoxList with no prevalues.

    I have now created a new DataType called 'RegisterCheckBoxList' with just one PreValue 'Subscribe to our mailing list' so therefore it now matches in the Members section.

    However im still having problems for problem number 2 showing the 'My Account' area so they can untick the 'Subscribe to our mailing list' as this is not showing checked, im testing that the user id definitley ticked to recieve the mailing list, but again not showing up on the front end.

  • Comment author was deleted

    Feb 27, 2013 @ 12:31

    Ok thanks for the extra details i'll try to replicate and see how it can be fixed

  • Comment author was deleted

    Feb 27, 2013 @ 13:26

    Ok found a fix for the checkbox, map that to a true/false datatype

    Then you'll need to update \Umbraco\plugins\umbracoContour\Views\FieldType.CheckBox.cshtml

    and change

    @if(Model.ContainsValue("True"))

    into

    @if(Model.ContainsValue("True") || Model.ContainsValue("1"))

    Looking into the prevalues now

  • Comment author was deleted

    Feb 27, 2013 @ 13:38

    Ok also found a solution for the prevalue stuff :)

    First make sure to setup prevalue sources linked to the datatypes and use those on your form

    Then in the \Umbraco\plugins\umbracoContour\Views\FieldType.DropDownList.cshtml file

    change

     @if (Model.ContainsValue(pv.Value))

    to

     @if (Model.ContainsValue(pv.Id))

    and that does the trick

  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 14:49
    Neil Hodges
    0

    Hi Tim

    Yep the checkbox solution has now been resolved and is working great. Im still having problems with the drop downs.

    I have used this code on the FieldType.DropDownList.cshtml,

    <option value=""></option>
        @foreach (var pv in Model.PreValues)
        {
            if (Model.ContainsValue(pv.Id))
            {
                <option value="@pv.Id.ToString()" selected>@pv.Value</option>
            }
            else
            {
              <option value="@pv.Id.ToString()" >@pv.Value</option>
            }
            
        }

    and created a seperate folder in /views/Forms/44dbc41f-c127-4a4e-8431-1126ff9f8072 like so as to make sure its that Contour Form im working with.

    I have set a breakpoint at

    Model.ContainsValue(pv.Id)
    

    but it just skips over the matching guid where it should drop in and set it's selected value, i think 'ContainsValue' is where the problem may be, is there anyway i can debug that code? i assume this is inside a DLL though?

     

     

     

     

     

  • Comment author was deleted

    Feb 27, 2013 @ 14:52

    Can you add @Model.Value to see what value is stored

  • Comment author was deleted

    Feb 27, 2013 @ 14:53

    And is your contour field using a prevalue source that is linked to the datatype ?

  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 15:03
    Neil Hodges
    0

    Hi

    Where do i need to put @Model.Value ?

    My Contour field is a standard DropDownList selected from the Type list, it has a default value of {member.membertitle}

    The Pre Values are added in like this

     

    The member's properties is like this

    And its DataType is as follows

  • Comment author was deleted

    Feb 27, 2013 @ 15:07

    Yeah that won't work then :) you' need to create a new prevalue source, umbraco datatype prevalues (read only) and select dropdown titles, then on your form update the field to use the prevalue source, it should all work then :)

  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 15:25
    Neil Hodges
    0

    Ah i see,

    Is there a tutorial you know of i can use to do this? Im still very new to Umbraco so any help on that would be great, unsure how i can get a custom datatype to show up in the contour fields drop down to select it.

    It would come in usefull for the my City's dropdown list as that has about 400 pre values in it, if i can reuse that as a datatype in the contour field that would save me a lot of time ;)

  • Comment author was deleted

    Feb 27, 2013 @ 15:33

    Sure check out this short intro: http://www.screenr.com/I3F7

  • Comment author was deleted

    Feb 27, 2013 @ 15:34
  • Neil Hodges 338 posts 987 karma points
    Feb 27, 2013 @ 15:41
    Neil Hodges
    0

    Ah that is amazing!! Ive literally just set the Title to use prevalue source and worked first time.

    I feel this problem was a little more about my in-experience with Umbraco and Contour than anything else, thankyou for your time and patience with me on this Tim, much apreciated ;) all resolved now! =D

  • Comment author was deleted

    Feb 27, 2013 @ 15:49

    No prob, glad I could help :)

  • Amir Khan 1287 posts 2744 karma points
    Nov 13, 2013 @ 21:03
    Amir Khan
    0

    Is this the most recent version of Contour Member Tools? http://our.umbraco.org/projects/developer-tools/contour-member-tools

Please Sign in or register to post replies

Write your reply to:

Draft