How to remove colon (:) in emails

perandre

New Member
In the emails, I get colon before the value entered in the form, like this:
Message:

Elevens navn
: jklø
Hjem telefon
: jklø
Mobiltelefon elev
: jklø
Mobiltelefon foresatt
: jklø

How can I make that NOt happen? Looks funny...
 
edit components/com_fabrik/fabrik.class.php and find the function sendEmail()

and where ever theres a line that looks like this:

$message .= $oElement->element_label . ' : ' . $labels[$key] . "\n"

replace it with

$message .= $oElement->element_label . $labels[$key] . "\n"
 
Thank you for your quick reply; it worked out great!

Is there also a way to have the colon appear right after the "question" in the email, instead of having it right before the "answer" on the next line?

Thanks again! Running a musicschool is so much easier with this component ;)
 
Yes there is. The line break comes from the fact that the wysiwyg editor adds a "<br />" in at the end of each label
To remove this you would need to edit all those line you just edited to something like this:

$message .= str_replace(array('<br>', <br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

cheers
Rob
 
Thanks again! I'm having some issues, not being a php-guy. I added the missing ' that seems to be left out before the
Code:
<br/>
in the example. But then I get a syntax error message saying there's an unexpected ';' on line 1193. There's only one semicolon there, and it's at the end of the line, of course.
 
Rob Clayburn said:
Yes there is. The line break comes from the fact that the wysiwyg editor adds a "<br />" in at the end of each label
To remove this you would need to edit all those line you just edited to something like this:

$message .= str_replace(array('<br>', <br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

cheers
Rob

i made but:

Parse error: syntax error, unexpected '<', expecting ')' in /web/htdocs/www.hotellameridiana.net/home/hotel/components/com_fabrik/fabrik.class.php on line 1190

Why?

I want the label and the element in the same line.

HELP!!!
 
ale said:
Rob Clayburn said:
Yes there is. The line break comes from the fact that the wysiwyg editor adds a "<br />" in at the end of each label
To remove this you would need to edit all those line you just edited to something like this:

$message .= str_replace(array('<br>', <br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

cheers
Rob

i made but:

Parse error: syntax error, unexpected '<', expecting ')' in /web/htdocs/www.hotellameridiana.net/home/hotel/components/com_fabrik/fabrik.class.php on line 1190

Why?

I want the label and the element in the same line.

HELP!!!

In order to understand to us:

Original:
question:
answer

new:
question: answer


As I can make this change?

They are little expert of php, thanks
 
Just before the middle <br/>, there's supposed to be an apostrophe ( ' ). Look careful, and you'll notice one is missing!

That will probably take away your error message, and create a new one...see my post above :)
 
Per André Rønsen said:
Just before the middle <br/>, there's supposed to be an apostrophe ( ' ). Look careful, and you'll notice one is missing!

That will probably take away your error message, and create a new one...see my post above :)
I see

But now the errror is:
Parse error: syntax error, unexpected '}' in /web/htdocs/www.hotellameridiana.net/home/hotel/components/com_fabrik/fabrik.class.php on line 1192

is correct:
Code:
$message .= str_replace(array('<br>','<br/>','<br/>'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"
 
Code:
for( $i=0; $i<count( $data[$elName] ); $i++ ){
					 					$tmpData = $data[$elName][$i];
					 					$key = array_search($tmpData, $values);
					 					$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"
					 				}
					 			}else{
					 				$message .= $oElement->element_label . ' : ' . $data[$elName] . "\n";
					 			}
				 			}

This is the part of the file, but not work!!!!
 
I wished I could help, but I didn't manage to solve my own problem.

I don't quite understand why we don't get the exact same error message. I don't even see an curly brackets (}) in your code...?
 
Per André Rønsen said:
I wished I could help, but I didn't manage to solve my own problem.

I don't quite understand why we don't get the exact same error message. I don't even see an curly brackets (}) in your code...?

can you send your file?

attach the file.

I try to use your file.

excuse for my english and thankyou
 
I deleted mine, and went back to the original, since I haven't had much time to try the different possibilites yet. I will post a file if I succeed!
 
Someone can help me?
I would want to only improve the mail that I receive in order to render it more leggibile.

I would be much pleasing one.

Thanks of all the component is fantastic
 
Ale - in your example you have a missing ";" on the end of this line:

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

it should be

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n";

hth rob
 
Rob Clayburn said:
Ale - in your example you have a missing ";" on the end of this line:

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

it should be

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n";

hth rob

Thank you now work.

But the problem is the same:

The mail:

Nome e Cognome
: Alessandro xxxxxx
E-mail
: zalexo@lxxxxxx.it
N° di Telefono
: 347773737373
Offerta richiesta
: Settimana All inclusive
Data di arrivo
: mkjlksaj
Data di partenza
: kjlkjlkj
Servizio richiesto
: Pensione completa
Tipologia di camera
: kljkljl
N° di adulti
: lkjlkj
Data di nascita e altezza bambini
: lkj
Come ci hai trovato?

How I make to make it to become therefore?

Nome e Cognome : Alessandro xxxxxx

E-mail : zalexo@lxxxxxx.it

N° di Telefono : 347773737373

Offerta richiesta : Settimana All inclusive

Data di arrivo : mkjlksaj

Data di partenza : kjlkjlkj

Servizio richiesto : Pensione completa

Tipologia di camera : kljkljl

N° di adulti : lkjlkj

Data di nascita e altezza bambini : lkj

Task is useful to all possession one mail more former. Therefore he is much leggibile and easy interpretable one. Thank you for the support. Excused my elementary English.
 
ale said:
Rob Clayburn said:
Ale - in your example you have a missing ";" on the end of this line:

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n"

it should be

Code:
$message .= str_replace(array('<br>','<br/>','<br />'), '', $oElement->element_label) . ' : ' . $labels[$key] . "\n";

hth rob

Thank you now work.

But the problem is the same:

The mail:

Nome e Cognome
: Alessandro xxxxxx
E-mail
: zalexo@lxxxxxx.it
N° di Telefono
: 347773737373
Offerta richiesta
: Settimana All inclusive
Data di arrivo
: mkjlksaj
Data di partenza
: kjlkjlkj
Servizio richiesto
: Pensione completa
Tipologia di camera
: kljkljl
N° di adulti
: lkjlkj
Data di nascita e altezza bambini
: lkj
Come ci hai trovato?

How I make to make it to become therefore?

Nome e Cognome : Alessandro xxxxxx

E-mail : zalexo@lxxxxxx.it

N° di Telefono : 347773737373

Offerta richiesta : Settimana All inclusive

Data di arrivo : mkjlksaj

Data di partenza : kjlkjlkj

Servizio richiesto : Pensione completa

Tipologia di camera : kljkljl

N° di adulti : lkjlkj

Data di nascita e altezza bambini : lkj

Task is useful to all possession one mail more former. Therefore he is much leggibile and easy interpretable one. Thank you for the support. Excused my elementary English.


is complicated my demand? Nobody has an idea?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top