I am overriding the node edit form by panels. Normally each field of a content type has a form item on panels' node form tab.

For a flag, if I check: "Display checkbox on node edit form", it shows on normal node edit form. But I cannot find an item to put this checkbox on the panel overriden node form.

Please see the attached image. There should be an item for flag in the shown list.

CommentFileSizeAuthor
#1 Flag-link.PNG13.6 KBSinovchi
panel_form.png39.91 KBSinan Erdem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sinovchi’s picture

FileSize
13.6 KB

Look in the Entity tab:
Flag link

joachim’s picture

Does that mean this feature is already available?

Sinan Erdem’s picture

@biarr: are you sure it is the form item (checkbox), not the output of flag?

Sinovchi’s picture

@Sinan Erdem
You are right. It was an output of the flag, sorry for misleading.

Renee S’s picture

The flag will show up in the "base form" output, but you can't separate it out.

PhilY’s picture

Issue summary: View changes

OK, adding the "Flag for node" content allows to flag an existing node in edition mode (node/*/edit).
What about creating a new one?
Without Panels, you can flag the content you're are creating (in node/add form) but with Panels, the "Flag for node" triggers an error:

An HTTP error 404 occurred.
http://mysite.dev:8888/flag/unflag/bookmarks/?destination=node/add/page&token=EMCdOOFKKZ6efZvGoqCWpwUj6gfByo2Dpf1EGJt01UY

Is there another panel content to use for node/add/page variant?

NWOM’s picture

I'm glad I ran across this issue. It appears that since the Flag checkbox is not available as a pane within "Form Content" that the initial value cannot be set. Anyone found a workaround in the meantime?

Edit: I found a workaround using the Rules module, if you need the value to always be set.

First, you have to disable "Display checkbox on node edit form" and then add a rule "After saving new content of type" with the action "Flag a Node". This way, whenever a new node is created, the current logged in user will automatically subscribe to it.

I hope this helps others looking for the same functionality.