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.
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.
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,
<optionvalue=""></option>@foreach (var pv in Model.PreValues)
{
if (Model.ContainsValue(pv.Id))
{
<optionvalue="@pv.Id.ToString()"selected>@pv.Value</option>
}
else
{
<optionvalue="@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?
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 :)
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 ;)
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
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
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 :)
Thanks Tim,
I apreciate your help. I shall download the new version of Contour ;)
Comment author was deleted
Be aware that one is for umbraco 6, not sure what you are running?
Ah
I am running version 4.11.1.3, i asume i shouldn't try to manually upgrade it then?
Comment author was deleted
Nope, more details tomorrow I'll look into the issues then :)
Comment author was deleted
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
Hi Tim
nope didnt seem to fix it :(
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
Ok thanks for the extra details i'll try to replicate and see how it can be fixed
Comment author was deleted
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
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
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,
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
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
Can you add @Model.Value to see what value is stored
Comment author was deleted
And is your contour field using a prevalue source that is linked to the datatype ?
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
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 :)
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
Sure check out this short intro: http://www.screenr.com/I3F7
Comment author was deleted
And here are some docs on prevaue sources http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Editor/Defining-and-Attaching-Prevaluesources/
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
No prob, glad I could help :)
Is this the most recent version of Contour Member Tools? http://our.umbraco.org/projects/developer-tools/contour-member-tools
is working on a reply...