<% if(umbraco.cms.businesslogic.member.Member.GetCurrentMember() == null){ %> <p>Please login before you cast your vote.</p> <%}else{ Umbraco.Forms.Data.Storage.RecordStorage s = new Umbraco.Forms.Data.Storage.RecordStorage(); var all = s.GetAllRecords(new Guid("12c58e28-ca9e-4e05-9849-8ae8ed555109"));
var voted = all.Find(r => r.MemberKey.ToString() == umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id.ToString()); if (voted == null) { %> <umbraco:Macro FormGuid="12c58e28-ca9e-4e05-9849-8ae8ed555109" Alias="umbracoContour.RenderForm" runat="server"></umbraco:Macro>
<% }else{ %> <p>Looks like you already voted.</p> <% }} %>
I have pretty the same question, but without members. For this I want to search in specific fields (ex: name, course number, etc.) in the contour entries. Is this possible?
I tried to do something like this to show the entries first (only to see if it works) and then perfom a specific search:
<% Umbraco.Forms.Data.Storage.RecordStorage s = new Umbraco.Forms.Data.Storage.RecordStorage(); var all = s.GetAllRecords(new Guid("fb815000-6865-49fe-9db2-6c10110e359a "));
Save the form with the current member
hi!
I have a form inside a member area and want to save which member entered the form. Is that possible?
Comment author was deleted
Hi,
Well that should already happen, contour will save the memberid by default
Hmm...strange. In the entries list I only see IP and PageID?
What if i dont want the member to be able to register multiple entries? is that possible?
Comment author was deleted
Sure, here is an example:
Comment author was deleted
Might not be in the entries viewer but should be in the exports
Perfect!
Worked nice!
Another question: Could I display the form but disabling the submit button?
You can either inherit from the renderform, http://farmcode.org/post/2010/03/26/Regionalizing-validation-messages-and-regex-in-Umbraco-Contour.aspx, or wrap it in your own control, http://harald.ulriksen.net/2010/6/1/wrapping-an-umbraco-contour-form-in-your-own-user-control.aspx#comment-2. You can then disable the button in the OnPreRender event. Locate the button by traversing the control tree and check for type (and button text)
Hope this helps,
Harald
Hi all
I have pretty the same question, but without members. For this I want to search in specific fields (ex: name, course number, etc.) in the contour entries. Is this possible?
Thanks for your advice.
Cornelia
Hi all
I tried to do something like this to show the entries first (only to see if it works) and then perfom a specific search:
Should this approach work? At the moment it doesn't.
Thanks a lot in advance for your input.
Cornelia
is working on a reply...