2

I have a many flag fields. When Authenticated users bookmark a content, they can enter value in flag fields.

I want to activate some fields of flag field when I create (add) a content.

For example, I have many flag fields of colors. When I create (add) a content, I want to activate some of the flag fields of colors. Because I want users to enter value of some colors, not all of color's field.

When I create first content I want to active 5 fields and when I create second content I want active 3 fiels and etc. I want to active some fields when I creating a content actually I want to have a control on flag fields.

How can I do it?

2
  • Hey @Hamed, I think you should put a little more work into your question. It's a bit hard to read. One easy improvement would be to try and break long sentences into smaller ones. And regarding the actual question: If I understand you correctly, you have many different color flags, e.g. Blue Flag, Red Flag, etc. And you want only some of these flags to be available to the users. Is this correct? Are these users anonymous? Do you want that all (anonymous) users have access to only a limited set of the Color Flags for all content? Or, is this set different for different content? Commented Apr 3, 2016 at 21:56
  • @StefanosPetrakis I edited my question.
    – Hamed
    Commented Apr 10, 2016 at 21:39

3 Answers 3

1

Consider using the Conditional Fields module. Excerpt from its project page:

Conditional Fields allows you to manage sets of dependencies between fields. When a field is “dependent”, it will only be available for editing and displayed if the state of the “dependee” field matches the right condition.

When editing a node (or any other entity type that supports fields, like users and categories), the dependent fields are dynamically modified with the States API.

You can, for example, define a custom “Article teaser" field that is shown only if a "Has teaser" checkbox is checked.

2
  • dear @pierre This module hasn't suitable for my goal.
    – Hamed
    Commented Apr 13, 2016 at 11:03
  • Merci (oeps: thank you) for the feedback). Give me some time to think about a possible alternative ("sales start when the prospect says no", right?) ... Commented Apr 13, 2016 at 11:57
0

Okey, this one was fairly easy.

You will need the Flag per node module. Once you install this, you can select which flags are active for each node. Below are some screenshots, demonstrating how different flags are available for different nodes. You can see each node's view and edit pages, on the bottom right corner of the node view pages you can see the active flag fields:


Node A

enter image description here

enter image description here


Node B

enter image description here

enter image description here

4
  • It's good, but doesn't manage flag fields, this module manages flag types. Thank you Stefanos.
    – Hamed
    Commented Apr 18, 2016 at 22:18
  • Did you see the Screenshots? It manages flag fields, per node. ' I want to active some fields when I creating a content': it does exactly what you asked for. I don't understand your requirement, or you didn't understand my answer. Have another look and correct me if I am wrong. Cheers Commented Apr 18, 2016 at 23:26
  • At the right side of a node, you can see the activated flag fields. See 1st and 3rd Screenshot. Commented Apr 18, 2016 at 23:28
  • Dear @stefanos I wrote an answer below. ;)
    – Hamed
    Commented Apr 19, 2016 at 7:47
0

I want to manage First Screenshot, not second Screenshot. First Screenshot is flag field, and second screenshot is flag type. flag field

flag type

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.