This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
- in Subject line
Started 17 years ago by celldet | 7 posts |
-
Is there a way to remove the - in the subject line of emails? For example in the Subject line if I have {element 4} the out put is -Subscribe whereas element 4 is only Subscribe.
Posted 17 years ago # -
Hi,
Are you sure already remove "-" on subject field in email menu? if the value only template variable, it should not give any character on subject email.
MachForm Support
Posted 17 years ago # -
oh yes I am sure. Only have template value in the area. That is it.
Posted 17 years ago # -
Hmm.. what is {element_4} on your form? A dropdown? checkboxes?
MachForm Founder
Posted 17 years ago # -
It is a checkbox
Posted 17 years ago # -
Hi,
i see .. since you are using check box,it will be a "-" character in there. You can replace "-" to another character like " " (space). To do so you should edit "includes/helper-functions.php" around line 275~285, you will find these code :
if($data['element_type'] == 'textarea'){ $template_values[$i] = nl2br($data['value']); }elseif ($data['element_type'] == 'file'){ if($target_is_admin === false){ $template_values[$i] = strip_tags($data['value']); }else{ $template_values[$i] = strip_tags($data['value'],'<a>'); } }else{ $template_values[$i] = $data['value']; }replace with this one
if($data['element_type'] == 'textarea'){ $template_values[$i] = nl2br($data['value']); } elseif ($data['element_type'] = 'checkbox' && $form_id == '16' && $data['element_id'] == '1' ) { $template_values[$i] = str_replace('-',' ',$data['value']); }elseif ($data['element_type'] == 'file'){ if($target_is_admin === false){ $template_values[$i] = strip_tags($data['value']); }else{ $template_values[$i] = strip_tags($data['value'],'<a>'); } }else{ $template_values[$i] = $data['value']; }in that example, i assume that code will work for form id = 16 and element id = 1, make sure you have adjust the form and element id first.
MachForm Support
Posted 17 years ago # -
Thank you. I will try
Posted 17 years ago #
Reply
You must log in to post.
