Copied to clipboard

Flag this post as spam?

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


  • trfletch 598 posts 604 karma points
    Jul 10, 2009 @ 18:34
    trfletch
    0

    Doc2form only on certain pages

    Hi,

    How can I make it so that a form only appears on certain pages, the document types are going to be the same but I would like it so that the Umbraco user could have a checkbox called something like "Show form" which when checked would should the form on the page. I realise I could do it with a different template but I would prefer if there was a way to have a checkbox instead. Any ideas?

  • Ove Andersen 435 posts 1541 karma points c-trib
    Jul 10, 2009 @ 20:27
    Ove Andersen
    0

    I'm not completely sure I know exactly what you want, but you could just add a true/false property on the document type?

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Jul 10, 2009 @ 20:45
    Casey Neehouse
    0

    I have never tried this, but you could try placing a panel around the doc2form macro and setting Visible to true or false based upon the property...

    Of course, this would be inline template code...  Let me know if you need an example.

  • trfletch 598 posts 604 karma points
    Jul 13, 2009 @ 10:33
    trfletch
    0

    Yes an example would be nice please

  • dandrayne 1138 posts 2262 karma points
    Jul 13, 2009 @ 10:46
    dandrayne
    100
    <xsl:if test="string($currentPage/data [@alias='showForm']) = 1">
    <style type="text/css>.Doc2Form {display:block;}</style>
    </xsl:if>

    might do it

     

  • trfletch 598 posts 604 karma points
    Jul 13, 2009 @ 12:56
    trfletch
    0

    Yes that works a treat thanks, just had to add the double quotes after text/css that you missed out :-)

  • 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.

Please Sign in or register to post replies