Copied to clipboard

Flag this post as spam?

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


  • Niels Kristiansen 166 posts 382 karma points
    Jan 27, 2011 @ 14:05
    Niels Kristiansen
    0

    sort entries as placed in the formular

    Hi,

    I have a customer who thinks it's a little bit frustrating that Contour is sorting the rows headers ASC/DESC instead of showing the inputs in the same way as the formular.

    He use contour for courses and export the information directly to Excel via CSV or HTML.

    The question is, is it possible to set sorting to none, so it shows it the same way as the formdesigner present it?

    Example:

    First name
    Last name
    Address
    Phone

    Instead of:

    Address
    First name
    Last name
    Phone

    Hope someone can help me out on this one :)

    /Niels

  • Comment author was deleted

    Jan 31, 2011 @ 09:25

    Hi Niels,

    Well you should be able to control the exports by updating the xslt files that are used for them.

    You can find the xslt files in

    /umbraco/plugins/contour/xslt

     

  • Niels Kristiansen 166 posts 382 karma points
    Jan 31, 2011 @ 09:36
    Niels Kristiansen
    0

    Hi Tim,

    That was exactly what is was searching for, thank you so much.
    Have a very nice day :)

    /Niels

  • Cornelia 31 posts 53 karma points
    Jun 17, 2011 @ 12:04
    Cornelia
    0

    Hi

    I tried to change the /umbraco/plugins/contour/xslt/excel.xslt, but nothing changes. Can you pleas give me a hint, what's wrong?

    I tried to changed only from "caption" to "SortOrder":

    <xsl:variable name="fields">
        <fields>
          <xsl:for-each select="$records//fields/child::*">
            <xsl:sort select="./SortOrder" order="ascending"/>
            <field>
              <caption>
                <xsl:value-of select="./SortOrder"/>
              </caption>
            </field>
          </xsl:for-each>
        </fields>
      </xsl:variable>

    Sorry, I am new to xslt and do not really know what I have to do...

    Thanks
    Cornelia

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 17, 2011 @ 18:28
    Tom Fulton
    0

    Hi Cornelia,

    I believe SortOrder is an attribute, but you are referencing it like an element.  Also you should only change it in the xsl:sort tag and not in the <caption> area.  I believe the below should work:

    <xsl:variable name="fields">
        <fields>
          <xsl:for-each select="$records//fields/child::*">
            <xsl:sort select="@sortorder" order="ascending"/>
            <field>
              <caption>
                <xsl:value-of select="./caption"/>
              </caption>
            </field>
          </xsl:for-each>
        </fields>
      </xsl:variable>

    Hope this helps,
    Tom

  • Cornelia 31 posts 53 karma points
    Jun 22, 2011 @ 11:07
    Cornelia
    0

    Hi Tom

    Thanks for your advice! It works now, when I use the button in the left top corner (Export) of the Form entries-page selecting export-type: csv file.

    -> But when I try to use the buttons on the right top corner "Save as CSV" or "Save for Excel" it does not work. ??? Where do I have the changes, that also these buttons work?

    Many thanks
    Cornelia

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 22, 2011 @ 13:18
    Tom Fulton
    0

    Sorry, not sure where those come from or if you'll even have access to change them...would be a question for Tim :)

  • Lachlann 344 posts 626 karma points
    Feb 13, 2013 @ 17:57
    Lachlann
    0

    Hey guys,

     

    Resurecting an old one here. I have a client who would really like to be able to change the order of the columns in the  back office entries table as well as the export. Now following the adivce above I am able to edit the xslt to remove the sort order and default to the order the feilds are defined in the form. Is there anyway to make this happen on the actual back office table?

    Thanks for you help

    L

  • Comment author was deleted

    Feb 18, 2013 @ 12:12

    @Lachlann, nope but if you are using one of the latest versions the order should be the one like defined on the form 

  • Lachlann 344 posts 626 karma points
    Feb 18, 2013 @ 15:11
    Lachlann
    0

    Thanks Tim. I will check out the upgrade process.

    Cheers

    L

Please Sign in or register to post replies

Write your reply to:

Draft