Community Documentation

Attaching fields to flags (Flag 3.x)

Last updated August 23, 2012. Created by mooffie on September 20, 2010.
Edited by joachim, socketwench, forestmars, MGParisi. Log in to edit this page.

As of the 7.x-3.x version, fields may be attached to Flags. This allows users to enter additional data when flagging a node, user, comment, or other entity.

Attaching fields to Flags

Log in as a user with the "administrator" role. Navigate to Administration > Structure > Flags. Here, you are presented with a list of Flags that have already been defined, one per row.

Click the manage fields link in the row for the Flag to attach fields. From this point forward, adding and configuring Flag fields is similar to adding and configuring fields on nodes.

Using Flag Fields

By default, Flags use the "JavaScript toggle" link-type. While this allows entities to be flagged without reloading the page, users cannot set any field values with the Flag. In order for users to set a Flag's field values, you must use the "Form" link type.

Navigate to Administration > Structure > Flags page. Click the Edit link for the Flag. Scroll down to the Display Options box and select the Confirmation Form radio button.

Comments

Dialog box

Hey,

First of all it's really great! I love it and it really helped us out.

Just a thought, isn't comment a sort of fieldable flag?

Thanks again,
Scryver

--------------------------------------------
Michiel Schriever
Scryver Design
ClimbCheck.com

Applying Flag field to D6

Hi,

Any plans to apply Flag field to D6 branch, as many site using D6

Thanks,

How do you edit a flag's field values?

If I attach a text or image field that a user fill out when they toggle a flag, how can they edit those values once they are submitted? The only way I can see is to unset the flag and force them to re-enter the values.

Page status

About this page

Drupal version
Drupal 7.x
Audience
Programmers, Site administrators, Site builders

Structure Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here