Passing functions through built-in contact form

I'm using the built-in zen contact form on my image.php page. It works great, but I was hoping to have the form email me the name of the image the user was on when they filled out the contact form.

I've experimented with editing the contact form by adding a text field or a hidden form field with the "print" or "get" "ImageTitle" and "bareImageTitle" functions. Unfortunately, the data did not show up on the email I received. I would appreciate any help in pointing me in the right direction.

Thanks

Comments

  • Did you modify the contact_form POST handling to process the extra field and to insert it into the email message?
  • Thanks sbillard. I'm not sure if all my code is necessary or correct, but I got it work. I added this to form.php:

    `
    <?php } ?>
    <?php if(showOrNotShowField(getOption('contactform_item'))) { ?>
    " />
    `
    Then in contact_form.php I added an instance of my field's name (item) where ever I saw the other fields mentioned. Thanks again.
Sign In or Register to comment.