Great Module!

Can you add support for Explainfield? It is a new CCK widget that adds js functionality for the explain/other options.

CommentFileSizeAuthor
#4 explainfield_token_support.patch777 bytesshawn dearmond

Comments

greggles’s picture

Title: Support for CCK Explainfield » Support for token in CCK Explainfield
Project: Token » Explainfield CCK widget
Category: support » feature

No - it's up to other modules to support token. Not the other way around.

snufkin’s picture

Nathan, could you give an example where you could use tokens? I never really used them, so an example would help me understand where to implement what.

nathanraft’s picture

Tokens would be used for the CCK Explainfield in cases where you would want the node title to be the explain field selection or option that was added.

For example:

The explainfield widget could have 4 check boxes (1. Train, 2. Car, 3. Horse 4. Other)

If the person choose on of the first 3 then the node title would be the value chosen. If they choose other then the value would be what they type in to the text box would be the title.

shawn dearmond’s picture

Status: Active » Needs review
StatusFileSize
new777 bytes

Here's a patch. See if it works for you. I've only ever tried it with workflow_ng.

if you select the "raw" token then it will only output whatever you selected in the pull-down. If you select the "formatted" token, then it will output either the one from the pull-down, or, if the trigger was selected, it will output the "Explain" textbox.

webanalya’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

Hi,

Thanks !
I'm using token with autonode_titles and it's also work well with the 6.x-1x-dev.

webanalya’s picture

oups !
it works when used values are in the list...
But when we set the value by 'other', token diplays :

- trigger key's value for [field_FIELDNAME-raw]
- key|label : help message (set in default values) for [field_FIELDNAME-formatted]

I need a solution but I'm so novice... Can someone help me ?

thanks !

shawn dearmond’s picture

@webanalya: Are you using it with Drupal 6? The patch I submitted isn't for D6.

webanalya’s picture

hi !
yes, i'm using this patch with D6... a test. it could have worked ! indeed, it works almost! all is in almost...