Response error
-
Hi,
This form worked perfectly in August but now I’ve initiated it again, its not working.
I can get it to submit when I remove the filter code from the functions.php file, this is the code I’m using (which previously worked)
add_filter( 'cf7sg_mailtag_cf7sg-form-orchid-order-form', 'filter_cf7_mailtag_cf7sg_form_orchid_order_form', 10, 3); function filter_cf7_mailtag_cf7sg_form_orchid_order_form($tag_replace, $submitted, $cf7_key){ /*the $tag_replace string to change*/ /*the $submitted an array containing all submitted fields*/ /*the $cf7_key is a unique string key to identify your form, which you can find in your form table in the dashboard.*/ if('orchid-order-form'==$cf7_key ){ $style = 'style="padding:0 3px;border-collapse:collapse;border-bottom:1px solid black[qtm]'; $tag_replace =' <table> <thead> <tr> <th> </th> <th style="padding:0 3px;border-collapse:collapse;border-bottom:1px solid black">Orchid Name</th> <th style="padding:0 3px;border-collapse:collapse;border-bottom:1px solid black">Qty</th> <th style="padding:0 3px;border-collapse:collapse;border-bottom:1px solid black">Supplier</th> <th style="padding:0 3px;border-collapse:collapse;border-bottom:1px solid black">Member</th> </tr> </thead> <tbody>'; if(!empty($submitted['orchid-name'])){ $style = 'style=[qtm]background-color:#e3e3e3[qtm]'; $row=1; foreach($submitted['orchid-name'] as $idx=>$plant){ $tag_replace .=' <tr> <td> </td> <td '.($row%2==0?$style:'').'>'.$plant.'</td> <td '.($row%2==0?$style:'').'>'.$submitted['qty'][$idx].'</td> <td '.($row%2==0?$style:'').'>'.$submitted['supplier'][$idx].'</td> <td '.($row%2==0?$style:'').'>'.$submitted['your-name'][$idx].'</td> </tr>'.PHP_EOL; $row++; } } $tag_replace .=' </tbody> </table> '; } return $tag_replace; }
Any help would be much appreciated.
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Response error’ is closed to new replies.