We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38304
    • 68 Posts
    echo'[[!FormItRetriever]]';
    $text='[[!+fi.text]]';
    
    $textlaenge = strlen($text);
    
    for($i=0; $i<$textlaenge; $i++) {
    echo ord(substr($text,$i,1)).',';
    }
    


    I will get 91,91,33,43,102,105,46,116,101,120,116,93,93,
    which is not the including... it's the Formit Placeholdername itself.
    Echoing $text outputs the including... i want the including seperate.

    So how do i extract it's contens(including) into another real variable like $text2?
    I want to check the ASCII of every single Char in the Content. Not of the Placeholdername.

    Hope i am understandable.

    Thank you!!!

    with best regards,
    Theo Retiker
      • 4172
      • 5,888 Posts
      you cannot use modx-tags in a snippet.

      where are you calling this code?
      Is it a formit-hook-snippet or a standalone-snippet?

      Think you will need a formit-hook. Check the formit-docu for infos how to create hooks.
      Or tell us more details about that, what you are trying.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 38304
        • 68 Posts
        I have to proof the content in
         [[!+fi.text]] 
        of special chars. Especially Linebreaks..

        BTW: I use it in a Snippet, and it shows it contents alright there... but i can't extract them. [ed. note: theoretiker last edited this post 12 years ago.]