- Posts: 33
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- How to chage the exta field value url link to mail function for k2 item extra feield?
How to chage the exta field value url link to mail function for k2 item extra feield?
- pamidipadudravid
- Topic Author
- Offline
- Junior Member
Less
More
13 years 2 months ago #98241
by pamidipadudravid
How to chage the exta field value url link to mail function for k2 item extra feield? was created by pamidipadudravid
hai.. i add the extra feild value for link in k2 item extra feild group , example: in froend end ,it like
mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
when we click it go for some other info.com , like that
but i need mail to means link MS Office mail for?
i like output like this : www.w3schools.com/html/tryit.asp?filename=tryhtml_mailto
what i do?
mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
when we click it go for some other info.com , like that
but i need mail to means link MS Office mail for?
i like output like this : www.w3schools.com/html/tryit.asp?filename=tryhtml_mailto
what i do?
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 2 months ago #98242
by BBC
Replied by BBC on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Try:
jproven.com/extensions/k2fields
It has option "pre-configured validated input fields for alpha, alphanum, number, real, integer, email, url".
jproven.com/extensions/k2fields
It has option "pre-configured validated input fields for alpha, alphanum, number, real, integer, email, url".
Please Log in or Create an account to join the conversation.
- pamidipadudravid
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
13 years 2 months ago #98243
by pamidipadudravid
Replied by pamidipadudravid on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Thanks for ur reply.....
Please Log in or Create an account to join the conversation.
- matthew turner
- Offline
- Senior Member
Less
More
- Posts: 66
13 years 2 months ago #98244
by matthew turner
Replied by matthew turner on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Hi,
if you use the switch case break loop in your template over rides (as posted by Daniel Arnolf here - community.getk2.org/forum/topics/output-extra-fields ) you can assign a PHP variable for each of your extrafields individually by ID, you can use a simple textbox extrafield and a bit of html/PHP to add anything you want !!
<?php foreach ($this->item->extra_fields as $key=>$extraField): switch($extraField->id) { case 1: $EmailAddress = $extraField->value; break; case 2: $EmailSubject = $extraField->value; break; case 3: $EmailLinkText = $extraField->value; break; }endforeach;?>
All you would need to do after adding the code above (as referenced above), would be to echo the textbox variable inside the html email link :
<a href="mailto:<php echo $EmailAddress; ?>?Subject=Hello%20again">Send Mail</a>
or
<a href="mailto:<php echo $EmailAddress; ?>?Subject=<php echo $EmailSubject; ?>">Send Mail</a>
or even
<a href="mailto:<php echo $EmailAddress; ?>?Subject=<php echo $EmailSubject; ?>"><php echo $EmailLinkText; ?></a>
I use this method in my templates.... hope this helps you.
if you use the switch case break loop in your template over rides (as posted by Daniel Arnolf here - community.getk2.org/forum/topics/output-extra-fields ) you can assign a PHP variable for each of your extrafields individually by ID, you can use a simple textbox extrafield and a bit of html/PHP to add anything you want !!
<?php foreach ($this->item->extra_fields as $key=>$extraField): switch($extraField->id) { case 1: $EmailAddress = $extraField->value; break; case 2: $EmailSubject = $extraField->value; break; case 3: $EmailLinkText = $extraField->value; break; }endforeach;?>
All you would need to do after adding the code above (as referenced above), would be to echo the textbox variable inside the html email link :
<a href="mailto:<php echo $EmailAddress; ?>?Subject=Hello%20again">Send Mail</a>
or
<a href="mailto:<php echo $EmailAddress; ?>?Subject=<php echo $EmailSubject; ?>">Send Mail</a>
or even
<a href="mailto:<php echo $EmailAddress; ?>?Subject=<php echo $EmailSubject; ?>"><php echo $EmailLinkText; ?></a>
I use this method in my templates.... hope this helps you.
Please Log in or Create an account to join the conversation.
- pamidipadudravid
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
13 years 2 months ago #98245
by pamidipadudravid
Replied by pamidipadudravid on topic How to chage the exta field value url link to mail function for k2 item extra feield?
www.andhrawishesh.com/k2/item/76-lakshmi-temple-uk.html?ctyi...
In above link i did what i want Mr.mat.., if i click on email extra field value, it will fire the mail to form...
Thanka a lot..... well done
In above link i did what i want Mr.mat.., if i click on email extra field value, it will fire the mail to form...
Thanka a lot..... well done
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 2 months ago #98246
by BBC
Replied by BBC on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Does Joomla after this hide email address form spam spiders ?
Need to test.
Need to test.
Please Log in or Create an account to join the conversation.
- pamidipadudravid
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
13 years 2 months ago #98247
by pamidipadudravid
Replied by pamidipadudravid on topic How to chage the exta field value url link to mail function for k2 item extra feield?
i cant get your words clearly.. can u tell me clearly?
plzzzzzzz
plzzzzzzz
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 2 months ago #98248
by BBC
Replied by BBC on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Email address is visible for spammers. Sometimes when Joomla detects "<a href="mailto:" it hides email in js code snippet to hide it.
But i cannot ge it to work. Don´t know what wrong i am doing. So Mat, if you can please explain it step by step ?
I don´t want to echo extra field to some special place in Item, but to use extra field already among other extra fields. Just to be clickable.
Can´t get it to work both way. Checked other topic too.
But i cannot ge it to work. Don´t know what wrong i am doing. So Mat, if you can please explain it step by step ?
I don´t want to echo extra field to some special place in Item, but to use extra field already among other extra fields. Just to be clickable.
Can´t get it to work both way. Checked other topic too.
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 2 months ago #98249
by BBC
Replied by BBC on topic How to chage the exta field value url link to mail function for k2 item extra feield?
I changed this:
case 1: $EmailAddress = $extraField->value;
to:
case 11:$Email = $extraField->value;
<a href="mailto:<php echo $Email; ?>?Subject=Hello%20again">Send Mail</a>
This is my field ID and field name, but no difference.
case 1: $EmailAddress = $extraField->value;
to:
case 11:$Email = $extraField->value;
<a href="mailto:<php echo $Email; ?>?Subject=Hello%20again">Send Mail</a>
This is my field ID and field name, but no difference.
Please Log in or Create an account to join the conversation.
- matthew turner
- Offline
- Senior Member
Less
More
- Posts: 66
13 years 2 months ago #98250
by matthew turner
Replied by matthew turner on topic How to chage the exta field value url link to mail function for k2 item extra feield?
Hi
My bad, I just noticed a typo with the code I posted above...sorry
should have been:
<a href="mailto:<?php echo $EmailAddress; ?>?Subject=Hello%20again">Send Mail</a>
My bad, I just noticed a typo with the code I posted above...sorry
should have been:
<a href="mailto:<?php echo $EmailAddress; ?>?Subject=Hello%20again">Send Mail</a>
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- How to chage the exta field value url link to mail function for k2 item extra feield?