We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10940
    • 71 Posts
    Is it possible to use a tv that is a rich text area for a snippet parameter?
    My following snippet works when I pass a plain text tv:

    SNIPPET

    <?php
    $copy = isset($copy) ? $copy : ’’;

    // Allow <img> and <a>
    $output = strip_tags($copy, ’<img><a>’);
    return $output;
    ?>




    When I pass a rich text area like this: [!removeSpaces? &copy=`[*rightcolumn*]`]]

    It actually prints out the snippet call and then passes the tv:

    [[removeSpaces? ©=`




    `]]





      • 4041
      • 788 Posts
      I can see 2 things which look out of whack:
      1. looks like you have mismatched the snippet start and end tags - [! ... ]]
      2. I think there is an issue with using params which would equal to an html entity, so change &copy to something else.
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 10940
        • 71 Posts
        Thanks for pointing them out but there not the cause of the problem.


        The snippet is actually printing out:

        [[removeSpaces? &right=`

        ****tv prints out here and has not been parsed by snippet as it still contains tags other than <a> and <img>*****

        `]]


        I can get it to work with plain text tvs. The only thing I can think of is you cannot use a rich text area as a tv snippet parameter. Can anyone let me know if this is the case?






        Snippet call:

        [[removeSpaces? &right=`[*rightcolumn*]`]]

        Snippet:

        <?php
        $right = isset($right) ? $right : ’’;

        // Allow <img> and <a>
        $output = strip_tags($right, ’<img><a>’);
        return $output;
        ?>