Closed (fixed)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2009 at 12:05 UTC
Updated:
17 Oct 2009 at 12:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
klausiWhat do you mean by "the node is approved"?
What event are you using in your rule?
What do you mean by "the token does not fit in the field"? It does not get replaced?
Are you sure this is related to the form support of Rules? Do you use any of the form events/actions?
Comment #2
B4n7o commentedSorry about this
I also have a field_approval which is a select list, options "yes" and "no"
then using views, i have these element all in a table, with field_approved as an editable field.
once you select yes as the approved option,
in rules
the event is
after updating existing content
then the condition is
field has value
then i select my "field_approval" field and select the "yes" option
so no the event will occur when "yes" is selected in the opproval field.
adding an action
"Populate a field"
select my "field_number_total"
and in there i want to use the token from my "field_number_unapproved"
the idea is to make the value of the total the value of the calculated field, once the the field_approval is selected.
here is where the issue is, you can use a token in this field, it asks for integers only, and you can only put 10 characters in the field, so it only writes the first few letters of the token anyway!
can you help with an alternative?
Comment #3
crizHi B4n7o,
I would suggest to use "Advanced: Specify the fields value with PHP code" in your "populate a field" rule.
It's not hard, try something like the following:
Comment #4
crizAlthough I faced simular space problems in other rules form fields. PHP execution is great, but the space for inserting more complex php code is often too limited. E.g. for going through an array variable per foreach (as used in multiple cck fields).
A little bit offtopic though...
Comment #5
klausiSo this is not related to Rules forms support.
Comment #6
fago