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

learn more… | top users | synonyms (1)

0
votes
2answers
14 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
131 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
75 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
19 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
8 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
2answers
55 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
18 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
7 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
22 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
46 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
18 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
15 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
4 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
16 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
25 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
23 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
28 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
15 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
24 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
0answers
25 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
18 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
52 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
30 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
39 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
31 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 ...
0
votes
0answers
12 views

How to get Currency module exchange value token for block?

I've recently installed the Currency module with the Yahoo! Finance co-module and was wondering how to post the current exchange rate into a block using the token system. [currency:USDtoJPY] or just ...
0
votes
1answer
57 views

Views Custom Field Handlers tokens

I am using simple views custom field handler. And I would like to make list of custom tokens for this $data array I have. How could I do that? class custom_views_handler_field_hostname extends ...
0
votes
1answer
27 views

Webform component permission

I have webform in my site, so I need to do that there are 2 user approval field components in my webform so they both should be unique value, in my case its working like if my name is joy then I ...
0
votes
2answers
41 views

Entityform redirect from query

I am struggling to get the appended parameter from the url when redirecting an entityform. I have an entityform that user can get to from multiple pages on the website. I want to redirect the user ...
0
votes
1answer
48 views

image in newsletter does not apply image style (defaults to original size)

I'm using a simplenews template (simplenews-newsletter-body.tpl.php) to output with mimemail in html. Everything works as it should except that the image in my newsletter is always taken from the ...
0
votes
1answer
53 views

How can I get the node ID inside my implementation of hook_tokens()?

I am trying to implement a custom token using the following code. /** * Implements hook_token_info(). */ function hook_token_info() { $type = array( 'name' => `enter code here`t('xyz'), ...
0
votes
0answers
22 views

How can I get Node tokens to be available for my fields

I am currently using Background Field module to set a background image and I want to set the css selector to incorporate node->nid. However it seems to not be available for me to use in my field but ...
0
votes
1answer
135 views

Shipping line items not displaying with [commerce-order:line-items]

I have Commerce and Shipping and Flat Rate installed and working correctly. Shipping is added to an Order and charged to the customer. But when I go to display the shipping line items, e.g. in a ...
0
votes
0answers
8 views

Modify a token from pathauto module

pathauto provides a hook called:[node:menu-link:parents:join-path] /** * Implements hook_tokens(). */ function pathauto_tokens($type, $tokens, array $data = array(), array $options = array()) { ...
0
votes
0answers
17 views

why can I not extract the line item from the token

I have an online store and would like to extract the purchased line item at check out for further processing in php. Now, I have enabeled tokens in my PGP Code text format and have moved processing ...
0
votes
1answer
19 views

How can I use tokens in my content

I want to use tokens in my content but it seems like it doesn't let me. I've found an article about using the Token Filter module but I have not been able to configure it so that it would print. In ...
0
votes
0answers
13 views

tokens in email doesnt work

in admin/config/people/accounts in mails, there is a Notification of comment email, so i edit in : Hi, [user:name]! [comment:author] commented on [comment:node:title]. (i took the tokens from " ...
0
votes
0answers
78 views

How to get 'default image' value of image field token?

I have an imagefield with a 'default image' uploaded and set in the field settings. When I use this image field's token, it does not return the 'default image' I'd expect to see when nothing is ...
0
votes
1answer
36 views

how to make URL aliases of nodes created via form include node title of original page?

Say I have a content type called "X", and every node of Content type "X" has a form that will create content type "Y" How do I go about setting up the URL alias of content type "Y" so it will be ...
1
vote
0answers
25 views

Use Tokens to get the title of a node a form was submitted from

I have a bunch of nodes that contain forms on them that when submitted will create further nodes of another content type. Using Token fields is it possible to have a field on the newly created nodes ...
0
votes
0answers
36 views

Auto populating the ALT & Title Fields on an Image Content Type

I have an Image content type (with caption, etc, category fields etc) which I populate with EXIF and auto label. All Fine. I would like to populate the Alt & Title fields using a token or EXIF ...
0
votes
1answer
26 views

Combine Token title with url in an email

I send emails automatically to users. There is a link in these mails, which points to a node. But I want to use the node title as an alias for this link, so that the link is not directly displayed in ...
0
votes
0answers
133 views

Creating a custom token that gets value of node fields

new to Drupal / PHP. What I'd like to do is get the value of a couple fields from a node. Then create a custom token from them so I can use them in the meta tag module. Or just get the value of a ...
0
votes
0answers
13 views

How can I insert token to Label in Rate module?

How can I insert token to Label in Rate module (path: Structure/Rate widget/Edit widget/OPTIONS/LABEL) in Drupal 7? Thank you for every response and kindness. I am Drupal novice.
5
votes
0answers
212 views

How to access values from earlier steps in multi-page Webform?

I'm using Webform 4. It uses Drupal's tokens, not it's own % tokens like it used to in version 3, and pretty much all what I found was about webform 3. Say I want to make multi-page subscription ...
0
votes
2answers
28 views

PHP snippet: why comparing the term id with a number keeps getting the wrong result?

I have a Drupal 7 site. I have this taxonomy field that I get printed out using tokens and Display Suite Module. So, if I create a "code field" at /admin/structure/ds/fields, I can type: ...
0
votes
2answers
50 views

Custom tokens in custom module

The story : I create lets say a simple module to store input data and sent a mail when you click save. Now i done the part of store data, send mail and retrieve data, but i would like to add tokens ...
0
votes
1answer
29 views

Previewable email templates token replacement

From my form_alter code, I would like to redirect to email template (Previewable email templates) $form_state['redirect'] = url('pet/email_template', $options ) The params are set as $options = ...
2
votes
1answer
129 views

What is :source in the Token module?

I look at the List of tokens and I see a lot of tokens with the same name and description, but some node have :source appended to it. Some of these, such as [node:title], I can understand, since title ...
0
votes
0answers
15 views

Profile2 fields won't show up in the profile pages after D7.34 update

After updating to Drupal 7.34, all profile2 fields won't show up in the profile pages. I have a panel inside each profile that shows all fields using tokens, where I type: ...