When using the action "populate a field" (for Rules 1), you are often limited by the widget that the CCK field is set to – both for input and validation. A common example is node references – you can't use a token to set these, since the widget validates that the input is actually a valid node title (or NID). But similar examples can be found for just about any special validation or non-textfield input.

It would be really great to have an option
[ ] Skip CCK input validation and use textifield for input
in the rules configuration form.

I don't think this is an easy task, but it would make it much easier to use Rules for setting field values (without resorting to using PHP filter).

(In Rules 2 this is not really a problem (by what I've experienced so far), since you have data selection as an input method.)

Comments

fago’s picture

Component: Rules Core » Rules Engine

>(In Rules 2 this is not really a problem (by what I've experienced so far), since you have data selection as an input method.)

yep, that was I thought is needed to properly fix this.

It would be really great to have an option
[ ] Skip CCK input validation and use textifield for input
in the rules configuration form.

Makes sense. This would have to go in the CCK rules integration, which resides in CCK. Anyway, I think it makes sense to keep this issue here, as probably people would look for it here first.

>I don't think this is an easy task, but it would make it much easier to use Rules for setting field values (without resorting to using PHP filter).

Yep! I personally won't have resources to work on it, but I'd be happy if someone else wants to take care of it!

sarinic’s picture

Is this the same Problem / Issue?
http://drupal.org/node/1144118

itangalo’s picture

For information: There is now a pretty decent workaround for this available in the brand new Rules Bonus Pack (http://drupal.org/project/rb). The action "Set a CCK field without validation" gives you a plain text field to use for input, allowing you to use tokens and bypassing any widget validation functions (for good and bad).

grasmash’s picture

That module doesn't have any releases?

I actually just posted the same basic problem on a related ticket here:
http://drupal.org/node/705860

Seems that this is a popular issue.

itangalo’s picture

@madmatter23: Now it has a release! It should show up in a few minutes. (It is also possible to check out the development code with Git, if you got that.)

ss54’s picture

I just discovered that my CCK email field skips validation. For example: If I write myname@yyyy without dot come, the email is not rejected. Can any body, please, tell any workaround this.

itangalo’s picture

@ss54: This is a feature (or bug) in the email module, and is not really related to what is being discussed in this thread. Including several questions in one issue makes it difficult to manage the issues.

(I bet there is at least one issue about this in the email module – perhaps even a patch to fix it.)

mitchell’s picture

Status: Active » Postponed (maintainer needs more info)
tr’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)