Skip to main content
21 events
when toggle format what by license comment
Nov 10 at 12:05 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
May 10 at 23:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jan 3 at 18:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Aug 31, 2023 at 9:01 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
May 2, 2023 at 21:00 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jan 1, 2023 at 19:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jun 10, 2018 at 7:35 history edited Pierre.Vriens CC BY-SA 4.0
added 21 characters in body; edited tags; edited title
Apr 12, 2014 at 12:14 history edited avpaderno CC BY-SA 3.0
edited tags; edited title
Mar 30, 2014 at 12:57 history edited avpaderno
edited tags
Mar 6, 2014 at 23:12 answer added franksj timeline score: 0
S Mar 5, 2014 at 22:35 history suggested Andre Baumeier
added message tag
Mar 5, 2014 at 22:23 review Suggested edits
S Mar 5, 2014 at 22:35
Mar 5, 2014 at 20:57 comment added franksj I have tried both _ and -. <?php strlen('[message:field-foo]') ?> just uses the string '[message:field-foo]'. I'm trying to make it use the value of the field field_foo.
Mar 5, 2014 at 18:18 comment added Dave Bruns The message module provides access to tokens in two forms: field_foo and field-foo (note the hyphen). I believe you should use the hyphenated form when you want to work with the field value. Did you try that?
Mar 5, 2014 at 17:50 comment added franksj Quite so! I'll get the conditional logic part if I can actually figure out how to reference my field vlaues. That's the part I can't seem to crack.
Mar 5, 2014 at 17:31 comment added Dave Bruns OK, so you're using the Message module, right? And you're trying to figure out how to evaluate the contents of a text field attached to a message and display something conditionally based on what you find in the field?
Mar 5, 2014 at 17:22 history edited franksj CC BY-SA 3.0
added 58 characters in body
Mar 5, 2014 at 17:21 comment added franksj I go to Structure > Message Types. I click Edit on my message type. In one of the "Message Text" boxes, I want to put the equivalent of <?php strlen('[message:field_foo']) ?>, but that works and actually outputs the length of that message type field set for that particular message.
Mar 5, 2014 at 17:06 comment added Dave Bruns To clarify: are you asking about how to conditionally display a field (or information that depends on the contents of a field) attached to a custom content type "message"? And when you say "token" do you mean an actual Drupal token: drupal.org/project/token?
Mar 5, 2014 at 16:55 review First posts
Mar 5, 2014 at 17:10
Mar 5, 2014 at 16:39 history asked franksj CC BY-SA 3.0