Hello

I am trying to make a OG group members selectlist which would be used as a user reference in the comment form. Only those users who are member of the current group shall be displayed in this select list, and comments can be referenced to these users only.

How do i do this ?

Is there any documentation or tutorial for using fool's rule ?

Thanks

Comments

Energyblazar’s picture

# Attempt 1 :

Event : Form is Viewed.

Conditions : Entity is of type , Parameter: Entity:[site:current-group], Entity type: OG Group.

Now when i try to add Content is of type "User Groups" and in the data selector when i choose node. It does not work.

Any clues to why ? or am i doing something wrong ?

seandunaway’s picture

What are you trying to do? Can you get the rule to work without any conditions first? What actions are you using?

Energyblazar’s picture

Yes i can get the rules to work without the conditions.....sorry for the confusion

Simply to state i wish to do two things

Create a select-list (list of active members of the current-group) in the drupal 7 default comment form of a Organic Group content type, which members of the group will only will be able access.

The select-list shall reference the comments to the user/member. Thus the comment can be shown in the profile of the user.

Here is what i tried

[Using Rules]

Event "Before Comment is Saved" Condition "Entity has a field.........parameter : entity [comment], Field: field_select_user......does not working.

Event "Before Comment is Saved" Condition "Entity has a field.........parameter : entity [comment:node], Field: field_select_user......does not working.

[Using Rules + Rules Form Support]

I am trying to use it too but in data selector value only site:current-(values) are coming, when i try to use node or comment any other value it does not accept it.

[Using Rules + Rules Bonus]

Same problem here cannot use node or comment or any other such value in data selector. Also i am unable to find any guide documentation or tutorial with regards rules and rules bonus or rules forms...

HENCE MY BASIC QUESTION BOILS DOWN TO ONE PROBLEM: HOW DO I ACCESS THE FIELD CREATED IN THE COMMENT FORM ?

THANK YOU....

seandunaway’s picture

Status: Active » Closed (won't fix)

I think you will need to create a custom module for this. I don't see how this module can accomplish this. Sorry :(

Energyblazar’s picture

No it is possible with rules...and is very simple too.....please watch this screencast ...... http://www.seblod.com/support/tracker/3070-article-category-id-not-worki... @ 13:40 these two things are explained

->Making field values accessible to Rules

->Using reference fields to access new data, such as tags on an article or nodes in a node reference field.

But the problem is that in this screencast he has explained how to do with content not with comment, and i wish to do the following with comment....

Energyblazar’s picture

Status: Closed (won't fix) » Active

please have a look at the screencast video and then if you wish u can close the support request....

Energyblazar’s picture

Given an attachment with screenshots of the field that i wish to access via rules....

In the above video, using the condition entity has field ....the field and the data both were made accessible to the rules.

But my question how do i do the same for comment form......?

How do i access a new field created in the comment form ?

Thanks in advance for your time and patience...... :)

seandunaway’s picture

Status: Active » Closed (won't fix)

I admit I'm not a Rules guru. Perhaps this is possible with Rules but I marked as won't fix because I am not sure how the Fool's Rules module will help to accomplish this. This module is some quick code to alter the page, form and bundle arrays right before output. There are no actions or events to read/receive values in this module.

That last time I was using Rules to read form values, there were some known bugs that made this difficult. I have not messed with it lately.

I think you will find better support in the Rules issue queue.

Energyblazar’s picture

Ok thanks.... but if i dont find a solution am coming back... :P just joking....

Also i c u got 14 commits, assuming your the creator of this module would like to compliment you for the nice work..... probably i should get hang of rules first and then learn the module u created....

One more thing ur module says.....

RULES ACTIONS
-------------
- Alter bundle: Modify any value, for any property, on any bundle!
- Alter form: Easily hide elements, create new ones, and so much more!
- Alter page: Override the entire look and feel of the site within seconds!

How do i do that ??? any doc or tutorials ??

Thanks again...

seandunaway’s picture

StatusFileSize
new23.35 KB

Here is an example rule that you can import:

{ "rules_fools_rules_example" : {
    "LABEL" : "Fool\u0027s Rules Example",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "fools_rules" ],
    "ON" : [ "fools_rules_event_page_alter", "fools_rules_event_form_alter" ],
    "DO" : [
      { "fools_rules_action_page_alter" : {
          "property" : "footer:system_powered-by:#markup",
          "value" : "Hello World!"
        }
      },
      { "fools_rules_action_form_alter" : {
          "form_id" : "search_block_form",
          "property" : "search_block_form:#default_value",
          "value" : "Hello World!"
        }
      }
    ]
  }
}

And here is the result. Notice I changed the footer text from "Powered by Drupal" to "Hello World!" and also set the default value of the search box to "Hello World!". The module can be used to set any bundle, form or page array values such as weight, visibility, required, etc.

Fools Rules Image