Prefill e-card receiver name and email? Prefill e-card receiver name and email?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Prefill e-card receiver name and email?

Started by Malm_Vogn, January 06, 2012, 10:55:57 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

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, 12: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.

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
} 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;

}

and below, add
if (!$recipient_name) {
    $recipient_name = 'Default name';
}
if (!$recipient_email) {
    $recipient_email = 'default@address.com';
}

Malm_Vogn

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

Αndré

Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.