Link to eMail - RESOLVED

Talk about link fields or link implementations

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

daviddelmonte
Master
Master
Posts: 159
Joined: Feb 23rd, '10, 15:06

Link to eMail - RESOLVED

Postby daviddelmonte » May 27th, '10, 12:42

Forgive me if this has been addressed, I could not find a reference..

Is it possible to have a link to an email client? I have an email field in a contact form, and would like to be able to click on it to send a message..

Thanks!!

David
Last edited by daviddelmonte on Jun 7th, '10, 05:30, edited 1 time in total.

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: Link to eMail

Postby administrator » May 30th, '10, 07:57

Look here:
$vm_columns = array(
........
........
"FieldName_7"=>array("header"=>"Name_G", "type"=>"link", "align"=>"left", "width"=>"X%|Xpx", "wrap"=>"wrap|nowrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal|upper|lower|camel", "summarize"=>"false", "sort_type"=>"string|numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>"", "field_key"=>"field_name_0", "field_key_1"=>"field_name_1", "field_data"=>"field_name_2", "rel"=>"", "title"=>"", "target"=>"_self", "href"=>"mailto:{0}"),

daviddelmonte
Master
Master
Posts: 159
Joined: Feb 23rd, '10, 15:06

Re: Link to eMail

Postby daviddelmonte » May 30th, '10, 09:26

OK. finally figured this one.. It could be better documented:

This is in VM view:
email:

Code: Select all

"email"=>array(
"header"=>"send email",
"type"=>"link",
"align"=>"left",
"width"=>"100px",
"wrap"=>"wrap",
"text_length"=>"-1", 
"case"=>"normal",
"summarize"=>"false",
"sort_by"=>"",
"visible"=>"true",
"on_js_event"=>"",
"field_key"=>"email", //this corresponds to my DB header
"field_data"=>"email", //this corresponds to my DB record
"rel"=>"",
"title"=>"",
"target"=>"_self",
"href"=>"mailto:{0}"),



and URL:

Code: Select all

"url" =>array(
"header"=>"link to Web Site",
"type"=>"link",
"on_js_event"=>"", 
"align"=>"left",   
"width"=>"150px",
"field_key"=>"url",
"field_data"=>"url",
"visible"=>"true",
"text_length"=>"150px",
"case"=>"normal",
"target"=>"_blank",
"href"=>"{0}" //RECORDS HAVE TO INCLUDE HTTP:// PREFIX UNLESS I CAN FIGURE OUT A BETTER WAY.
),



EM COLUMN VERSION...

Code: Select all


"email"=>array(
"header"=>"email",
"req_type"=>"se",   
"type"=>"link",
"on_js_event"=>"",
"field_key"=>"email",
"align"=>"left", 
"text_length"=>"-1",
"width"=>"150px",
"case"=>"normal",
"summarize"=>"false",
"visible"=>"true",
"rel"=>"",
"title"=>"",
"target"=>"_self",
"href"=>"mailto:{0}"),


"url" =>array(
"header"=>"Web Site",
"req_type"=>"sy",
"type"=>"link",
"on_js_event"=>"",
"field_key"=>"url",
"align"=>"left",   
"width"=>"150px",
"visible"=>"true",
"text_length"=>"-1",
"summarize"=>"false",
"case"=>"normal",
"rel"=>"",
"title"=>"",
"target"=>"_self",
"href"=>"{0}"),




Return to “Field type: "link"”