Merge Codes like gravity forms
-
I am wantng to acheive merge code list beside textboxes and text areas I have seen this done many times via options frameworks I am using redux to complete my options panel So I am giving the user a section for emails.
This is a bit of code to show what i meen by a short code its anything between {}
`<?php//lets get the redem voucher email that will go to both the user and the admin.
$replacements = array(
‘({player_id})’ => $playerId,
‘({player_fname})’=> $player->display( ‘player_first_name’ ),
‘({player_lname})’=> $player->display( ‘player_last_name’ ),
‘({message_body})’ => nl2br( stripslashes( $ggs[‘player-redeem’] ) )
);
$message = preg_replace( array_keys( $replacements ), array_values( $replacements ), $ggs[‘player-redeem’]);
Below is a screen shot I want to acheive.
https://snag.gy/PkkJS.jpg
- The topic ‘Merge Codes like gravity forms’ is closed to new replies.