We had a need for the following to get some Content Profile data across to Mailchimp.

Current module supports only widgets 'number' and 'text_textfield', and only for single-item fields.

We wanted support for a few more widget types and for multiple-value fields as a comma-sep list.

Comments

xurizaemon’s picture

Assigned:xurizaemon» Unassigned
Status:Needs work» Needs review
StatusFileSize
new2.73 KB

Patch

xurizaemon’s picture

Updated (trivial changes only)

mrfelton’s picture

Cool, thanks. Works for me.

mrfelton’s picture

This one adds support for on/off checkboxes too.

djdevin’s picture

Works for me, but I think multi-value display should somehow be configurable like textformatter.

Pinolo’s picture

Marked #1063234: Content Profile Token installed but still no token. as duplicate. Also, I'm wondering what was the rationale behind the limits originally set.

vojvotkinja’s picture

What is the widget type for Taxonomy term select box or Content Taxonomy field?

vojvotkinja’s picture

Found it: add 'content_taxonomy_select' in _content_profile_tokens_allowed_widget_types array.

Regards

Ken Hawkins’s picture

Category:feature» bug

Successfully applied this patch to get better token support.

Also as the module description is "Add user tokens for content profiles." the existing module would seem at best partially complete, moving this to a bug report as the intended behavior does not occur, thus a bug.

djdevin’s picture

I'm looking at this patch and I don't think this takes into account using the value label, if you have key|value pairs in your allowed values. For example we have "md|M.D." and only the lowercase md ends up in the token.

I'm actually not sure why anyone would want the key instead of the label (possibly numeric) so maybe we should provide the label and fallback to the key?

djdevin’s picture

Here's a version that uses content_allowed_values to get the label if possible.

djdevin’s picture

Broke single-value fields, this should work on textfields and selectboxes with labels too.

djdevin’s picture

Sorry, goofed up the last patch.