DOCS

Group Assignment

FREE block. Allows the creator of an action to assign their action to a team.

Group assignment example

Why use this

In campaigns with a team structure, individual fundraisers need a way to join a team. This block provides the form to select and save a team assignment.

What it does

The block shows a Select2 dropdown listing all available get_fund_team posts. When the creator submits the form, their action’s _get_fund_team_id meta is updated. Once a team assignment is saved, it is locked. The creator cannot change it again through this block. Only a user with edit_others_posts capability can change an assignment after it is set.

The block is intended for single action pages. It does not support Query Loop context.

Form submission uses a POST request handled at template_redirect, protected by a nonce (get_fund_assign_team_{post_id}).

How to use it

  1. Add the Group Assignment block to the action page template.
  2. The block automatically shows the team selector to the action’s creator.
  3. Once submitted, the assigned team is shown and the form is locked.

Settings and options

OptionTypeDefaultDescription
Show group infobooleantrueShow the current assignment info panel
Button textstringUpdate Team AssignmentSubmit button label
Button colorstring#4a9d44Button background
Button text colorstring#ffffffButton text color
Button hover colorstring#d32f4aButton hover background
Border radiusnumber6Button corner rounding
Text weightstring600Button font weight

What you can and cannot do

  • Once a team is assigned, the assignment is permanent from the creator’s perspective. Only admins can change it.
  • The block is only actionable for the action’s creator. Other visitors see no form.
  • The block does not support Query Loop context.
  • Teams (get_fund_team CPT) must be created in the admin before they appear in the dropdown.

Troubleshooting

Dropdown is empty: No teams have been created. Create teams in Fundations > Teams in the WordPress admin.

Form appears to non-creators: Check that the action’s _get_fund_creator_id meta is set correctly. If it is empty, the creator check may fall back to post_author.