how might i modify the module so that it can evaluate PHP in the user defined markup body?

I found $markup_body which I think is the variable that holds it. Am I correct?

Comments

richardp’s picture

Status: Active » Closed (works as designed)

Hello,

Yes, I believe that variable is probably the one you want. However, I will say that what you are requesting is outside of the scope of this project. The markup is meant for just that-- markup. If you wish to evaluate PHP code on a particular form, you should use Drupal's method of "hook_form_alter" to achieve that, as there is already a wealth of material out there to help you along.

Good luck,
Richard

TheOldGuy223’s picture

Just in case your interested, on line 1320 of the module, I figured out by slightly changing the $markup_body to ".eval($markup_body)." it seemed to do the trick.

Modified Code

$markup_elements .= "
        <div class='draggable-form-item arrange-fields-draggable-markup' 
              id='$wrapper_id'>
          <div class='arrange-fields-control-handle arrange-fields-control-handle-markup'><span class='arrange-fields-handle-region'> &nbsp; &nbsp; </span>
            <a href='javascript: arrangeFieldsDialogEditMarkup(\"$wrapper_id\");' class='arrange-fields-config-markup-link' title='Configure this markup'>&nbsp;</a>
          </div>
          <div class='arrange-fields-markup-body form-item' 
              id='{$wrapper_id}_body'>".eval($markup_body)."</div>
        </div>";