zenphoto forums » General Zenphoto Discussion

Form on gallery specific to image

(5 posts)
  • Started 2 years ago by pennystewart
  • Latest reply from pennystewart
  1. pennystewart

    Member
    Joined: Apr '11
    Posts: 17

    Hi there,

    I am creating a website for an art gallery and they have requested a "contact form" next to the image which has already populated the data of the image into the form.

    My example page is here, http://pennystewartdesigns.com/merrepen/gallery/merrepen-arts/img_0863.jpg.php

    As you can see I have a form on the right hand side that I generated from a free form website. I tried to input the php codes for the "title" of the image etc into the value boxes for the form, but this did not work.

    Is there any way I can make a form with the image name in the subject "artwork title" on a form?

    Thanks for your help!

    Penny

    Posted 2 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,359

    If you ask if there is a Zenphoto way to do this with a custom form or the standard contact form no. You probably could do it using jQuery. See http://www.jquery.com.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. pennystewart

    Member
    Joined: Apr '11
    Posts: 17

    all good, I managed to figure it out using contact form and changing the coding a bit.

    thanks though!

    Posted 2 years ago #
  4. masterloney

    Apprentice
    Joined: Apr '11
    Posts: 2

    hi Penny, how did you do this? I need to get the same thing done....

    thanks

    Posted 2 years ago #
  5. pennystewart

    Member
    Joined: Apr '11
    Posts: 17

    hi masterloney,

    i enabled the "contact form" plugin in zenphoto..then i edited the /zp-core/zp-extensions/contact_form/form.php file to display the following for my "message" box: (this displays the album name & image name in the message box)

    <?php printf(gettext("Message<strong>%s</strong>:"),(checkRequiredField(getOption('contactform_message')))); ?></td>
    <td><textarea id="message" name="message" rows="5" cols="37" <?php if ($_processing_post) echo ' disabled="disabled"'; ?>><?php echo $mailcontent['message']; ?>Regarding <?php echo getImageTitle();?>, by <?php echo getAlbumTitle();?>.</textarea></td>
    </tr>
    <?php } ?>

    please see example here: http://www.pennystewartdesigns.com/merrepen/gallery/paintings/elise-dorat/blg1cts.jpg.php right hand side column is the form.

    thanks,

    penny

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.