This shortcode allows quick purchases of lottery entries with or without a custom price. You can for example use this shortcode for a “Quickpick” feature for “pick numbers” lotteries where the lottery will pick x numbers randomly for your user.
Furthermore this shortcode allows you to set a custom price for entering the lottery. If the price is set for the shortcode then the user will be charged this amount each time they click on the button. Note that the shortcode is bound by the same rules as you setup for your lottery, so if you have selected to exclude certain users or limit entries, these rules will be enforced by this shortcode as well.
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
id |
int | Yes | - | The lottery ID to show. |
entries |
int | No | 1 | The number of entries to pick |
draws |
int | No | 1 | The number of draws to pick. |
cost |
int or float | No | 0 | The cost of the quick draw. Use zero for free plays. |
label |
string | No | - | Button label. |
loading |
string | No | "Working ..." | Text to show while the quick pick is setup. |
confirm |
string | No | "Are you sure you want to get the quickdraw?" | Confirmation message to show before the quick pick is setup. |
class |
string | No | btn btn-lg btn-primary button button-primary button-large | Button classes. |
// Wrapper .mycred-lottery-quickpick { } // Results box .mycred-lottery-quickpick .mycred-my-plays { }
Example 1: Quickpick 5 sets of numbers for a “pick numbers“ lottery with the ID 1. No repeat.
[mycred_lottery_quickpick id=1 entries=5]Quickpick 5 Entries[/mycred_lottery_quickpick]
Example 2: Quickpick 1 entry for the next 10 draws for the lottery with the ID 2.
[mycred_lottery_quickpick id=2 entries=1 draws=10]Quickpick for 10 Draws[/mycred_lottery_quickpick]
Example 3: Quickpick 1 entry for the next 10 draws with the custom price of 5 points.
[mycred_lottery_quickpick id=2 entries=1 draws=10 cost=5]10 Week Quickpick[/mycred_lottery_quickpick]