Support > cpg1.5 email

Prefill e-card receiver name and email?

(1/2) > >>

Malm_Vogn:
Hi!

How do I prefill the ecard receiver fields with a name and an email adress?

We use our gallery to collect information about old photos; a substantial part of our visitors will not, or are not skilled enough to, register and hence make comments. We still want them to tell us what they know about the photo, so prefilled ecards sent to us we think is the way around.

Best regards

Terje S, Museum Nord - Narvik, Norway

Αndré:
IMHO the "Report to administrator" function is more appropriate for your purpose. If not, it's of course possible to predefine data in the ecard form. Just let me know if you need the corresponding code changes.

Malm_Vogn:

--- Quote from: Αndré on January 06, 2012, 01:44:59 pm ---IMHO the "Report to administrator" function is more appropriate for your purpose. If not, it's of course possible to predefine data in the ecard form. Just let me know if you need the corresponding code changes.

--- End quote ---

Good idea, but the Report to Administration form needs too much rewriting to serve our purpose. Image is too small, also.So yes, I do need the code changes. Thx for quick answering.

Terje

Αndré:
Open ecard.php, find

--- Code: ---} else {

    echo <<< EOT
            <a href="displayimage.php?pid=$pid">
                <img src="$thumb_pic_url" width="{$thumb_size['width']}" height="{$thumb_size['height']}" alt="" vspace="8" border="0" class="image" />
            </a>
EOT;

}

--- End code ---
and below, add

--- Code: ---if (!$recipient_name) {
    $recipient_name = 'Default name';
}
if (!$recipient_email) {
    $recipient_email = 'default@address.com';
}
--- End code ---

Malm_Vogn:
Thank U very much. Works like a charm  ;D Problem solved!!!!!

Navigation

[0] Message Index

[#] Next page

Go to full version