Suggestion: Capture the code to be conditionalized (and the condition) in a separate field (or fields) and construct the desired resultant output using a PT.I usually try as hard as I can to NOT assume that the users who are entering content know anything about HTML, javascript, etc. - Their job is to enter content, mine is to make sure that the content gets processed correctly to create the desired output.