SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75!  1
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

How to make Enquiry Form block using tokens

6 years 1 month ago #117017 by Donna-Russell
How to make Enquiry Form block using tokens was created by Donna-Russell
Greetings,
I am working with Rooms modules in Drupal 7, which is proving to be quite a journey.
One shortcoming seems to be not having a Book Now button on individual unit pages.
The way they have it set up is a bit like an airline booking site where put your dates in and then get served up a list of rooms in the results, from where there is a Book Now button.
But I know my client is going to want a book now button/enquiry on each individual unit's page.
I also thought it would be good for someone to be able to enquire about a unit, rather than booking it.
So I thought I could make a block using webform and using tokens to prepopulate the form with the title of the page the form is on.
I have Entity Reference, Token, Token Filter and Token Insert modules enabled.
Can you please give me any tips of how to configure the webform to pull that information in (which token I might use from the huge list available)?
I'd also love to have a Book Now button automatically appear in each unit page (maybe could use tokens as well?).
many thanks in advance

Please Log in to join the conversation.

6 years 4 weeks ago #117085 by steve
Hey Donna

Interesting that you should ask. I wrote a similar tutorial last week on this topic: www.ostraining.com/blog/drupal/prepopulate/

Afterwards, you're the 2nd person to ask me about pre-populating information from the page that people are on.

This module seems like it would be helpful: www.drupal.org/project/prepopulate

I think this is a topic worth writing a second tutorial on.

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!