1. Documentation
  2. Transfers
  3. [gamipress_points_transfer]

[gamipress_points_transfer]

Render a points transfer form.

This shortcode accepts different attributes based on the transfer_type attribute value.

Common Attributes:

  • points_type – The points type to transfer. Accepts: any slug of any points type registered.
  • transfer_type – The transfer type. Accepts: fixed, custom, options Default: fixed
  • button_text – Transfer button text. Default: Transfer
  • recipient_id – User that will receive the transfer.
  • select_recipient – Allow user to select a specific transfer recipient. If recipient is set it will be used as initial recipient selected. Accepts: yes or no Default: no
  • recipient_autocomplete – Enabling this functionality will add user suggestions to the recipient field.If this option is not enabled, user will be required to provide exactly the recipient user name or email. Accepts: yes or no Default: no

Fixed amount form (transfer_type=”fixed”)

User will see a points transfer form with the configured amount (without possibility to change it).

Attributes:

  • amount – Amount user will transfer. Default: 100

Example:
[gamipress_points_transfer points_type="credits" transfer_type="fixed" amount="100" button_text="Transfer" recipient_id="1" select_recipient="yes"]

Custom amount form (transfer_type=”custom”)

User will see a points transfer form where he can configure the desired amount of points to transfer.

Every time user changes the amount, the points balances at the end of the form will change without refresh the page.

Attributes:

  • initial_amount – Set the initial amount. Default: 100

Example:
[gamipress_points_transfer points_type="credits" transfer_type="custom" initial_amount="100" button_text="Transfer" recipient_id="1" select_recipient="yes"]

Options form (transfer_type=”custom”)

User will see a points transfer form where he can choose an amount of points to transfer from a group of predefined options.

If you set the attribute allow_user_input to yes, then a new option will be shown to let to the user enter a custom amount (like custom amount form).

Every time user changes the amount, the points balances at the end of the form will change without refresh the page.

Attributes:

  • options – Options available to transfer.
  • allow_user_input – Allow user input a custom amount to transfer. Accepts: yes or no Default: yes
  • initial_amount – Set the initial amount if allow_user_input is set to yes.

Example:
[gamipress_points_transfer points_type="credits" transfer_type="options" options="5,10,50" allow_user_input="yes" initial_amount="100" button_text="Transfer" recipient_id="1" select_recipient="yes"]

Was this article helpful to you? Yes No

How can we help?