Dear Khoa,
I would really appreciate if you could help me with this one.
I need to create new button on every Unit description content type page (see the picture below).
http://i.imgsafe.org/86b5ada62d.png
When it's pressed, it should open up webform very similar to the one used to create comments in guestbook (see the picture below).
http://i.imgsafe.org/86b5ca6c57.png
Same css with the addition of two new fields of "Arrival date" and "Departure date" as well as the field "Apartment title" that would keep apartment title. When button "Send inquiry" is pressed, email with all the data from the text boxes as well as "Apartment title" should be sent to admin email address.
Please, help me to achieve this. I will send the copy of this message to your email as well as links to my drupal files and dayabase.
Thank you in advance. Hope to hear from you soon.
Hi Denik,
We check your request and can see it is out of support policy. However, our developer can provide some simple instructions to help you work by yourself or if you would like him to customize you site, extra fee will be charged.
Hi,
Please check your email for more information
Thank you very much for your reply. However, I don't think I won't be able to afford your extra customization at this price, because it's beyond my budget at the moment. So, I was wondering if the developer could give me short and simple instructions on this so I could try to figure it out by myself. Please.
So here is instruction for you:
1. Create a new webform which has all required fields
2. Configure webform to display as block, configure email ....
3. Open file node--unit-description.tpl.php, after code
add
4. Print webform in file, set id to #id_of_webform and fuction display: none.
Thank you so much for your help, I followed your insrtuctions and I'm very close to solve the problem, so please, I'm only asking you for another few minutes of your time.
#1 and #2 steps I have done like this (see the picture below)
http://i.imgsafe.org/afcfd723d4.png
Also, I did #3 but I'm not sure if I have done it right way because form doesn't pop up. I'm not sure if I wrote the id_of_webform right, I found it from source code of the created webform (see the picture below)
http://i.imgsafe.org/afcfde0a26.png
And step #4 I found hard to understand so PLEASE, could you explain it in few sentences. Thank you so much for all your help so far.
D.
So, please
1. Go to admin/structure/pages/nojs/operation/page-guest_book/handlers/page_guest_book__panel_context_9c4a17f8-365e-4774-a0cb-54256bc4e816/content. It is Guest Book with popup form.
2. Find 2 panels named "Custom: Guest Book Intro" and "Webform: Testimonial Form"
"Custom: Guest Book Intro" is a panel displaying content that has button "WRITE IN GUEST BOOK". When clicking that button, you can see popup form.
"Webform: Testimonial Form" is panel containing popup form.
3. About code JS for event clicking button "WRITE IN GUEST BOOK", please open file scripts.js (sites\all\themes\md_hillter\js\front), find function "AwePopup". Our developer wrote it for event clicking button "WRITE IN GUEST BOOK" to display form. You can take a look for example.
4. About step #4
Please go to link https://www.drupal.org/node/26502, there is instruction to print webform. Because your Webform is assigned as block so we need to print in file node.
Thank you once again for your explanation! I have just one more question here:
How to set href value, so this button would open guest-book-popup form on any custom page or block that I've made?
Just to remind you that this button works on page /guest-book, and the code for the button is following
And on the page /guest-book-2 the code for the button is exactly like this
We recommend to use code
also, please take a look at step 3 at my above comment.