Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 631 posts 1018 karma points
    Oct 08, 2012 @ 15:40
    Dan Evans
    0

    Accessing form data in masterpage

    Hi

    I need to hide a Contour Form is there have been X number of submissions made. I can work this out in XSLT easily but need to know how to access this library method and parameters from a master page in C#. The same form is being used on several pages so I need to know how many times the form has been submitted on a particular page:

    count(umbraco.contour:GetRecordsFromPage($currentPage/@id)//uformrecord[pageid=$currentPage/@id])

    IN XSLT:

    Total number of places available: <xsl:value-of select="$currentPage/data [@alias = 'numberOfPlacesAvailable']"/><br />
    Number of applications received: <xsl:value-of select="count(umbraco.contour:GetRecordsFromPage($currentPage/@id)//uformrecord[pageid=$currentPage/@id])"/><br />
    Number of places remaining:  <xsl:value-of select="$currentPage/data [@alias = 'numberOfPlacesAvailable']-count(umbraco.contour:GetRecordsFromPage($currentPage/@id)//uformrecord[pageid=$currentPage/@id])"/>

     

  • Comment author was deleted

    Oct 09, 2012 @ 15:35

    Try the razor addons 

    http://www.nibble.be/?p=102

  • Dan Evans 631 posts 1018 karma points
    Oct 09, 2012 @ 15:49
    Dan Evans
    0

    Thanks Tim, I had considered that but:

    1. I'm running this site on an old version of Umbraco 4.0.4 using the legacy schema - ideally I don't want to upgrade just for this

    2. Even if I use Razor can that be used from within a MasterPage? Or can you run a macro from within a Razor Macro

    Thanks

    Dan

Please Sign in or register to post replies

Write your reply to:

Draft