I am not very good on php and am trying to do a very complex thing for me, and I am not sure if it is possible with this plugin, but I think it is, thats why I put the question.
I have a Catablog collection of items displayed in a gallery. In every item (product) I have a CONTACT link which links to a pop up contact form. I want this contact form field (product), filled with the product title.
The way I display the contact form in a pop-up in the catablog gallery is this
- create a contact form whose shortcode is this one: [contact-form-7 id=”170″]
- Add a new token named %CONTACT-FORM% to Catablog plugin: hacking the CataBlog.class.php file and adding in line 2572 the following line: $values[‘contact-form’] = do_shortcode(‘[contact-form-7 id=”170″]’)
- In the Catablog template I add the following code:
<a class="fancybox-inline" href="#contact_form_popup">CONTACT</a> <div class="fancybox-hidden" style="display: none;"> <div id="contact_form_popup"> %CONTACT-FORM% </div> </div>
so it displays the contact form in a pop-up whenever I click on the CONTACT link in the Gallery.
The problem comes here, I am not able to populate the (product) field in the contact form with the item title, which is what I want to do.
I have tried with this shortcode: [dynamictext dynamicname “CF7_get_post_var key=’title'”] but it takes the page title, not the product title.
I am also able to get the product title with the token %TITLE% on the template, but I dont know how to put it on the contact form pop-up…
Thanks in advance!
PS: catablog version 1.6.4
- The topic ‘Populating field on contact form popup with title of item in catablog gallery’ is closed to new replies.