Questions related to the Token module, or a form of token replacement system.

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

How to iterate over drupal tokens with php? Specifically how to format the result of a mutli-value [submission:value:?] token

I'm starting to mess with the webform-mail.tpl file, and I'm wondering if I can use the webform tokens in code? Specifically, one of my tokens is based on a webform_select_options_info() function, ...
0
votes
1answer
7 views

Refresh [account:one-time-login-url]

I have a module that creates a new user and automatically logs //set up the user fields $fields = array( 'name' => $login, 'mail' => $to_insert['email'], 'pass' => user_password(10), ...
0
votes
1answer
25 views

Choose specific format for hms field token

I'm using a token to include an hms field in an email sent with Rules. I'd like to include the hms field in the format m:ss, but it's displaying as seconds. I've tried enabling the custom display ...
1
vote
0answers
12 views

Using tokens in an entity form conditional field

Is there a module that will allow me to use token values (ie logged in user/email) as a field condition with entity forms?
0
votes
0answers
10 views

Token: How to get a field value of a book root's node (for auto entitylabel)?

I want to set a node title automatically. Part of that node title should be a fields value of the top level book node (book root). I tried [node:book:root:field-synonyms:0] to get the first value of ...
0
votes
0answers
19 views

Node Template > Title not displaying

We have three different environments (dev, stg, prod), but all the sites are nearly identical. I'm having an issue getting the title to display uniformly throughout all my environments. I've provided ...
0
votes
1answer
17 views

How to create authentication token in the HTTP header request for Json view

I have a view listing some fields from a content type then i made it in a Json format using View DataSource module, all is ok with me tell now i want to add authentication token in the header request ...
0
votes
0answers
15 views

passing filter to eva view

I watched the eva tutorial listed on the eva project page for drupal 7 and implemented that with our site. We have courses, objectives and evaluation content types. I am successfully able to attach ...
2
votes
1answer
29 views

Should I use contextual filters to limit the view results for each type of administrators?

I'm trying to display the View according to the current director, example: I have a content type called faculty news,and I have two faculties: Medicine and Sciences, the content type faculty news is ...
0
votes
0answers
12 views

Creating token to display cookie counter

I need some help with displaying the cookie counter to user. A friend told me i should use token_replace() instead of defining my own token. That'd be fast and easy but being new, It seems difficult ...
0
votes
0answers
16 views

Passing variables to custom tokens in Drupal 7

I'd like to leverage Custom tokens to produce coding templates for repetitive work, with the option of passing data to them in order to achieve customised results. My aim is a little like this guy, ...
0
votes
2answers
45 views

Fatal error: Allowed memory size of 134217728 bytes exhausted

Hi everyone when I am trying to add token to create auto label error is showing can anyone tell me that how to resolve it?. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to ...
2
votes
2answers
42 views

Fixed number of digits from Token random number [closed]

I want to use the Token random number module, but it says it generates "A random number from 0 to 2147483647". How can i change this and get fixed number of digits? For example, i need a 4 digits in ...
0
votes
1answer
14 views

Get an item in a list of taxonomy

Hello Drupal Community, I am creating a menu which has a link to an "editorial". I created a taxonomy named "edito" and created articles (content type) that are tagged with this taxonomy. I need to ...
0
votes
0answers
30 views

How to get new password by mail instead of password reset url (Forgot password)

When we click on "Forgot your password" and enter email id, Drupal will send password reset URL by mail. But is it possible Drupal send any random password by email instead of URL? I have checked ...
0
votes
0answers
9 views

node destination as webform field

In a content type nodes, I am trying to put a path to a webform in a block, using the following code: <?php $options = array('absolute' => TRUE); $nid = 20; $url = url('node/' . ...
0
votes
2answers
56 views

Inserting custom HTML using tokens

I'm trying to reduce repetitive coding by adding my own static HTML content into some form of reusable token that can be added into page bodies amongst regular code, but can't find a method. Here's ...
0
votes
0answers
21 views

is using [current-page:query:service_name] token is safe from SQL Injection?

I'm using [current-page:query:service_name] token in my project to get parameters from the url into the database (using webforms and tokens). I was looking in the code to check if there is some kind ...
0
votes
0answers
18 views

Tranlated webform confirmation page Submission [field values] are not working

I translate my webform using Webform Localization module. After i submit the form in another language then the default English form: E.g the Dutch form. I see the following on the confirmation page: ...
0
votes
1answer
22 views

How to remove markups of 'div' and 'span' from the billing info displayed through token

I am trying to add token for billing information in order confirmation email . The token does its job but also displays markups of 'div' and 'span'. Whats surprises me is all the other tokens in the ...
1
vote
1answer
49 views

How to email the webform content to current page author email “Token [current-page:node:author:mail] is not working any more”

I have a content type topic, and a Webfrom "contact" as block which is available for topic content type only. Any registered user can create topic, and I want to use the Webfrom to contact the topic ...
0
votes
2answers
79 views

How to use tokens in a filtered text field

In Drupal, when you create a field, there is the option "Text Processing". You can select either "plain text" or "Filtered text". When I create a field with "Filtered text", I am unable to use it as ...
0
votes
2answers
37 views

Using menu tokens (or similar?) to create “invite user link” on OG Group page

I am new to tokens but was planning to use the menu to token to create a simple menu allowing group administrators to easily invite users without going to the Group administration menu. The default ...
0
votes
2answers
69 views

Grab Node ID from URL of Current Page?

How do I grab the Node ID in the URL of the current page and pass it through a link? 1) The URL on the current page is in the format: website.com/parameter/parameter/parameter and the third ...
3
votes
2answers
104 views

URL alias, tokens is replacing 0s and 1s with node and entity [duplicate]

Has anyone seen a case that url aliases or tokens end up replacing certain numbers in a url with the words node and entity. A UTC Timestamp in my url ended up replaced like this: ...
0
votes
2answers
77 views

redirect to another page on webform submit using [current-page:query:?] token

I am trying to configure a webform to redirect to another page after submission by including the redirect location in the url: http://mysite/content/barb?destination=content/discus According to ...
4
votes
1answer
174 views

Tokens causing incorrect text substitutions

I'm running Drupal 7 on Ubuntu 14.04 server, core and all modules up to date as of today (7th May). We have noticed today that zeros (0) are not displaying correctly in blocks that have a custom ...
2
votes
2answers
101 views

Using token in Block title

I want to use token to show user name in block title. But it is not working. I tried like [user:name] Thanks in advacne
0
votes
0answers
22 views

Redirect Module - Tokens

I am trying to redirect my users from a [uid] page to the front page via the Redirect Module. I use the Redirect module together with the Redirect Token module. The Redirect token module only allows ...
1
vote
0answers
15 views

What is the correct format for a Timefield in an email body?

I'm using the Timefield API to define a "time" field. The field represents an arrival time for an event and is formatted to look like HH:MMpm (for example, 5:30pm). I'm trying to format the time in ...
1
vote
1answer
268 views

How to use views replacement patterns while using the PHP filter?

In views, when using the standard text formatter you can place replacement tokens such as [title] into the HTML code either in a rewrite or in this case global text for Drupal to render. In this ...
0
votes
0answers
25 views

Use Address tokens in view

Within a view display, I am trying to display only the first name of a customer. The information is collected via a standard addressfield form. Within the available "Replacement Patterns" none of ...
1
vote
0answers
26 views

How do I debug Commerce Order Comments token not expanding in Message?

Using Kickstart 2 with Commerce Message. The token [message:message-commerce-order:field_order_comments] has begun to -sometimes- not expand. ie. sometimes it render as expected, but sometimes not. ...
0
votes
1answer
31 views

Redirect user to dynamic url

I am writing a custom rule, I do not know how to approach getting the correct URL for the redirect. I have a page - website.com/content/newsletter-activity-001 that needs to redirect an anonymous ...
0
votes
3answers
64 views

Get content page field value

I have a content page contain three field. Number A: Number B and Total Number. During add content page, I fill up Number A: 20 and Number B: 30. How to let Total Number auto display 20 + 30 = 50?
0
votes
1answer
33 views

Use Tokens and/or Replacement Patterns in Shortcodes

Looking for a way to add a token/replacement pattern into shortcode. For example, creating a button where different text and link is required depending on other factors - something like the ...
0
votes
0answers
35 views

How do I add Webform-CiviCRM tokens into Webform emails?

The following is the HTML from a form I have created using the Webform CiviCRM integration module: <input class="civicrm-enabled form-text required" type="text" ...
0
votes
0answers
14 views

Advanced Entity Tokens - tokens are not rendered for none-admin users

I have advanced_entity_tokens installed. When I insert a token into a textfield, the token is rendered for the admin users fine. But not for the none-admin users. I didn't find any permission or any ...
0
votes
1answer
36 views

Field values of nodes available as tokens

we would like to habe a node type only for side wide available values. We think we have a title and a 'value' field. When we need one of these values in text areas/fields we would like to type ...
1
vote
1answer
38 views

Why might the user's email address not show up in Views Send or as a Token?

I have set up a User view, with User: Email as one of the fields (the others are username and some text fields) . The email address of each user shows correctly in the view, either formatted as text, ...
0
votes
0answers
30 views

Extracting first few letters from tokens

I am trying to generate Product SKU through Auto SKU which uses tokens, but with tokens I get full names from fields such as store city, store name, product name, serial field. ...
2
votes
0answers
31 views

How do I make an object available as a token?

I have created a custom token. Inside my token's code, I'm getting a node object. I want to give the users the option of displaying this node's properties. So, for example, assuming that my token's ...
0
votes
2answers
26 views

How to specify English path alias for Chinese?

I created a node of type Post in English, and translated it using Entity Translation to Chinese, Traditional. I then set the path alias for the content type to be ...
0
votes
0answers
30 views

vbo action to reset back to default value

Text field's default value is set using field_default_token and it is working fine. There are several nodes present prior adding default value and needs to be set in bulk(no input is required again as ...
0
votes
1answer
59 views

Replacement pattern for one value of a multivalue field in views

Rewriting the results of a views field, I wonder if there is a way to use a replacement pattern for the first, second and third value of a multivalue field. In my case, as example: I have tried to ...
0
votes
1answer
39 views

The %element-title is using the following invalid tokens

I have defined few tokens that are grouped in few separate groups similar to [node:content-type:name] scheme. For example I'd like to have a token like [master:sub_group_1:tokan_A]. So This is how ...
0
votes
0answers
99 views

Drupal 7 node save gives intermittent token validation error

When submitting a content type node I'm occasionally seeing a form validation error regarding tokens being invalid. I've tried reducing the token tree depth too using Token Tweaks which helps on ...
0
votes
1answer
34 views

Taxonomy view : add token term_name in url

I have a view overriding taxonomy term pages with the help of Panels. I defined that pattern in URL aliases : destinations/[term:parents]/[term:name]. Now I'd like to set a clone of that view, ...
0
votes
0answers
69 views

correct usage of token in href link text

I have a content type with a text field and want to use that text field as the text in the href link in a block on that page. The block appears as a button and I want to use the text field as the text ...
0
votes
0answers
48 views

display suite code - set token value of color field module as php variable an convert to rgb

$hex = "[node:field-ref-participants-category:field_color]"; print $hex; list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x"); echo "rgba($r,$g,$b,.9)"; Why does $hex printed correctly, but doenst work ...