Competition Entry Forms

Last Updated: 19/11/2024     Tags: jquery wrapper, competitions, competition entry forms
  • Switch Version
  • V5
  • V4

Competition entry forms use the enter form action, and typically sign entrants up to a designated list then send an email confirming the entry has been received. Entry forms often collect more details than regular subscribe forms; full names and phone numbers are often required to ensure winners can be contacted.

An example competition entry form is shown below; this form logs all events under Campaign ID 12, adds entrants to List ID 5, and then sends Activity ID 144 confirming the entry. First name, last name, email address, phone number and state details are collected.

Form submission occurs in the background, and once complete the callback function is called.

<script type="text/javascript">
// Update the Taguchi plugin defaults with the correct values for this campaign
$.fn.tmform.defaults = $.extend($.fn.tmform.defaults, {
    instance: 'edm.taguchimail.com', // set to the client's instance name (<instance>.taguchimail.com)
    campaign_id: 12, // campaign ID of the viral campaign, refer to Taguchi Admin > Campaigns
    list_id: 5, // list ID of the destination list for competition entrants, refer to Taguchi Admin > Subscribers > Lists
    debug: false, // to prevent data being saved to TaguchiMail, change this to true
    bind: 'submit' // remove this line (and the comma on the line above) if no form validation is used
});

$('#entryform').tmform({
    action: 'enter',
    callback: function () {
        alert("Form submission has completed");
    },
    event_ref: 'e', // ID of the entry event, refer to Taguchi Admin > Campaigns > Tracked Events, and look up the ID of the 'Entered' event
    activity_id: 144  // ID of the Taguchi Activity to send to the entrant, refer to Taguchi Admin > Campaigns > (name of viral campaign), and insert the ID of the Entry Confirmation message
});
</script>

<form id="entryform" action="" method="post">
    <fieldset>
        <label for="firstname">First Name</label>
        <input type="text" id="firstname" name="subscriber_firstname" title="First Name" />

        <label for="lastname">Last Name</label>
        <input type="text" id="lastname" name="subscriber_lastname" title="Last Name" />

        <label for="phone">Phone</label>
        <input type="text" id="phone" name="subscriber_phone" title="Phone" />

        <label for="email">Email</label>
        <input type="text" id="email" name="email" title="Email" />

        <label for="state">State</label>
        <select id="state" name="subscriber_state" title="State">
            <option value="">Select a state</option>
            <option>NSW</option>
            <option>VIC</option>
            <option>ACT</option>
            <option>QLD</option>
            <option>SA</option>
            <option>WA</option>
            <option>NT</option>
            <option>TAS</option>
        </select>

        <input type="submit" name="submit" value="Enter" />
    </fieldset>
</form>