1. Documentation
  2. Points Cards
  3. [gamipress_points_card_generator]

[gamipress_points_card_generator]

Render a points card generator form to let user extract points to a card.

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

Common Attributes:

  • points_type – The points type(s) to extract. Accepts: single or comma-separated list of any points type’s slugs registered.
  • select_points_type – Allow user to select the points type to extract. If you check this option choose at least 2 points types or more (or select all points types). Accepts: yes or no Default: no
  • amount_type – The amount type. Accepts: fixed, custom, options Default: fixed
  • button_text – Form button text. Default: Generate Card

Fixed amount form (amount_type=”fixed”)

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

Attributes:

  • amount – Amount user will extract. Default: 100

Example:
[gamipress_points_card_generator points_type="credits" amount_type="fixed" amount="100" button_text="Generate Card"]

Custom amount form (amount_type=”custom”)

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

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_card_generator points_type="credits" amount_type="custom" initial_amount="100" button_text="Generate Card"]

Options form (amount_type=”custom”)

User will see a points card generator form where he can choose an amount of points to extract 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 extract.
  • allow_user_input – Allow user input a custom amount to extract. Accepts: yes or no Default: yes
  • initial_amount – Set the initial amount if allow_user_input is set to yes.

Example:
[gamipress_points_card_generator points_type="credits" amount_type="options" options="5,10,50" allow_user_input="yes" initial_amount="100" button_text="Generate Card"]

How can we help?