I’ve had a look through the PHx code. The problem as I see it is that PHx doesn’t distinguish between tags with a modifier and tags without modifiers. Ideally PHx should leave tags without a modifier alone and let modx->parseDocumentSource() (or any snippets that use them) handle them. I made some changes to the PHx code that does this for [+placeholder+] style place holders at least. This seems to alleviate pixelschute’s problem.
So I was going to post something similar to this until I read this thread.... I too am using modx .96 and PHx 2.1.2 and I can’t get the &from=`[.email.]` or &subject=`[.name.]`to work as well.
it seams about a month since the last post. so has anyone come up with a viable work arround or updated PHx or something?
thanks
SteveO
if( $params[from]{0} == ’(’ ) $params[from] = str_replace( array(’((’,’))’), array(’[+’,’+]’), $params[from] ); // pixelchutes PHx workaround
<strong>*custom* 1.4.4</strong> Robust form parser/processor with validation, multiple sending options, chunk/page support for forms and reports, and file uploads.
if( $params[from]{0} == '(' ) $params[from] = str_replace( array('((','))'), array('[+','+]'), $params[from] ); // pixelchutes PHx workaround
if( $params[from]{0} == '(' ) $params[from] = str_replace( array('((','))'), array('[+','+]'), $params[from] ); // pixelchutes PHx workaround if( $params[fromname]{0} == '(' ) $params[fromname] = str_replace( array('((','))'), array('[+','+]'), $params[fromname] ); // pixelchutes PHx workaround
&to=`++email++` &from=`++email1++` & fromname=`++name++` &subject=`++name++ wants to show you this awesome page`
Thanks pixelchutes
if( $params[from]{0} == '(' ) $params[from] = str_replace( array('((','))'), array('[+','+]'), $params[from] ); // pixelchutes PHx workaround
worked well I did mod it a little more to include
if( $params[from]{0} == '(' ) $params[from] = str_replace( array('((','))'), array('[+','+]'), $params[from] ); // pixelchutes PHx workaround if( $params[fromname]{0} == '(' ) $params[fromname] = str_replace( array('((','))'), array('[+','+]'), $params[fromname] ); // pixelchutes PHx workaround
I just need to figure out how to get it to work in the subject as well
THanks again
SteveO
if( $params[to]{0} == '(' ) $params[to] = str_replace( array('((','))'), array('[+','+]'), $params[to] ); // PHx workaround if( $params[from]{0} == '(' ) $params[from] = str_replace( array('((','))'), array('[+','+]'), $params[from] ); // PHx workaround if( $params[fromname]{0} == '(' ) $params[fromname] = str_replace( array('((','))'), array('[+','+]'), $params[fromname] ); // PHx workaround if( $params[replyto]{0} == '(' ) $params[replyto] = str_replace( array('((','))'), array('[+','+]'), $params[replyto] ); // PHx workaround $params[subject] = str_replace( array('((','))'), array('[+','+]'), $params[subject] ); // PHx workaround
Thanks for these solutions, guys. A year and a half later, and they’re still necessary! I suppose it’s frustrating the PHx still hasn’t fixed this, but at least there’s people on top of things.
// pixelchutes PHx workaround
foreach( $params as $key=>$val ) $params[ $key ] = str_replace( array(’((’,’))’), array(’[+’,’+]’), $val );