would love a button to send a file to email from say an email field..
so for instance, you could attach a file such as a brochure and then email to the relevant or selected email address in same or child record.
send a file by email
Re: send a file by email
you can send a link... to a record with a button.. like this..
Just put this code below in the hook file (see this link for how: http://www.bigprof.com/appgini/help/adv ... ore_insert)
for the table name under this line..
function YOUR TABLE NAME HERE_before_insert(&$data, $memberInfo, &$args){
Just put this code below in the hook file (see this link for how: http://www.bigprof.com/appgini/help/adv ... ore_insert)
for the table name under this line..
function YOUR TABLE NAME HERE_before_insert(&$data, $memberInfo, &$args){
Code: Select all
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html xmlns="http://www.w3.org/1999/xhtml" />
<head></head>
<body>
<a href="http://YOUR DOMAIN NAME HERE.com/YOUR APPGINI FOLDER NAME HERE/TABLE NAME HERE_view.php?SelectedID=".$data['selectedID']."><button type="button">Click to email this record</button></a>
</body>
</html>
?>
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN
Re: send a file by email
Woops.. forgot the email part.
here...
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<script language="javascript">
function emailCurrentPage(){
window.location.href="mailto:?subject="+document.title+"&body="http://YOUR DOMAIN NAME HERE.com/YOUR APPGINI FOLDER NAME HERE/TABLE NAME HERE_view.php?SelectedID=".$data['selectedID']."+escape(window.location.href);
}
</script>
</head>
<body>
<button><a href="javascript:emailCurrentPage()">Click to email this page and link to this record</a></button>
</body>
</html>
?>
here...
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<script language="javascript">
function emailCurrentPage(){
window.location.href="mailto:?subject="+document.title+"&body="http://YOUR DOMAIN NAME HERE.com/YOUR APPGINI FOLDER NAME HERE/TABLE NAME HERE_view.php?SelectedID=".$data['selectedID']."+escape(window.location.href);
}
</script>
</head>
<body>
<button><a href="javascript:emailCurrentPage()">Click to email this page and link to this record</a></button>
</body>
</html>
?>
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN