Copied to clipboard

Flag this post as spam?

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


  • Andrew 32 posts 52 karma points
    Feb 10, 2010 @ 20:28
    Andrew
    0

    XSLT macro to list form entries

    I'm trying to create a macro which will list all of the entries on a form.  I'm really new to umbraco and would appreciate some help. 

    On the macro, I have created a parameter with the alias "FormID" with a type "FormPicker".  In the XSLT macro, I have the following,

    <xsl:variable name="FormID" select="/macro/FormID"></xsl:variable>

    To loop through each entry, I have the following,

    <xsl:for-each select="umbraco.contour:GetRecordsFromForm($FormID)//uformrecord">

    but this line gives me an error:

    System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

    I know this is something simple, but I am not sure what is wrong.  I have looked at the value of $FormID and it seems to be correct and of the correct format.  Thanks for your help. 

  • Harald Ulriksen 207 posts 249 karma points
    Feb 11, 2010 @ 15:58
    Harald Ulriksen
    0

    I assume this happens when you try to save the xslt file. What happens is that Umbraco tries to validate the xslt by executing a transformation (afaik), but the formID is not passed in properly. You can either write an xsl:if check before the xsl:for-each or try  to check the ignore error if you know that your xslt is otherwise fine.

    Harald :-)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies