This tag is used in conjunction with the [MM_Form] tag. You use it to create buttons that perform actions relevant to the form. More specifically, it outputs a URL that can be placed in the href attribute of an HTML anchor tag so when the link is clicked the appropriate action will be executed. Depending on the type of the parent form, different button types are supported.


Attributes


type - Indicates what type of button to create. Valid values for the type attribute are dependent upon the type of the parent form. See the section below for a list of valid values based on form type.


Valid Button Types by Form Type


Different form types support different button types. Below is a list of supported button types along with any additional supported attributes broken down by form type.


checkout


all - This outputs a form submit button for each active payment method on the MemberMouse site. This also the buttons on the checkout form to dynamically respond to your payment method configuration. If you want to have direct control of button layouts, then use [MM_Form_Button type='submit'] instead.


Additional Attributes for Buttons with Value 'all'

label (optional) - Specifies the label to display on the onsite payment button. The default value is Submit Order.


color (optional) - Specifies the color to use for the onsite payment button. Acceptable values are light_blue, blue, green, red, orange, yellow, pink, purple, grey and black.



submit - This outputs a link that submits the form.


Additional Attributes for Submit Buttons

paymentMethod (optional) - Indicates what payment method to use when submitting the form. Acceptable values are defaultpaypal and clickbank, coinbase and coinbaseminimal. The default value is default. If default is specified, the default payment method with be used based on the payment method configuration in MemberMouse. If paypal, clickbank , coinbase or coinbaseminimal is specified, that payment method will be used when the user checks out.


isDefault (optional) - Indicates that the payment method associated with the button should be used when the enter key is used to submit the checkout form. Acceptable values are true or false. The default value is false. Only one button on a checkout form can be set as default. When the enter key is used to the submit the checkout form, the payment method associated with the button with the isDefault attribute set to true will be used. If no buttons on the checkout form as marked as the default then the payment method associated with the first button added on the form will be used.



applyCoupon - This creates a button that applies a coupon code to the order. In order for this to work, the [MM_Form_Field name="couponCode"] field must be present in the form.



myAccount


cancelMembership - This creates a link that goes to the save-the-sale page associated with a member's current membership level.


updateAccountDetails - This creates a link that opens a dialog box where the member can edit their account details.


updateBillingInfo - This creates a link that opens a dialog box where the member can edit their billing information.


updateShippingInfo - This creates a link that opens a dialog box where the member can edit their shipping information.


viewOrderHistory - This creates a link that opens a dialog box where the member can view their complete order history.


viewGifts - This creates a link that opens a dialog box where the member can view their complete gift history.



login


login - This outputs a submit button for the login form.


Additional Attributes for Login Buttons

label (optional) - Specifies the label to display on the button. The default value is Login.


color (optional) - Specifies the color to use for the button. Acceptable values are light_blue, blue, green, red, orange, yellow, pink, purple, grey and black.



class (optional) - Allows you to specify a custom CSS class for the button. If this is used the color attribute will be ignored.



forgotPassword


submit - This outputs a submit button for the forgot password form.


Additional Attributes for Submit Buttons

label (optional) - Specifies the label to display on the button. The default value is Submit.


color (optional) - Specifies the color to use for the button. Acceptable values are light_blue, blue, green, red, orange, yellow, pink, purple, grey and black.



class (optional) - Allows you to specify a custom CSS class for the button. If this is used the color attribute will be ignored.


resetPassword


submit - This outputs a submit button for the reset password form.


Additional Attributes for Submit Buttons

label (optional) - Specifies the label to display on the button. The default value is Submit.


color (optional) - Specifies the color to use for the button. Acceptable values are light_blue, blue, green, red, orange, yellow, pink, purple, grey and black.



class (optional) - Allows you to specify a custom CSS class for the button. If this is used the color attribute will be ignored.



1clickPurchase


applyCoupon - This creates a button that applies a coupon code to the order. In order for this to work, the [MM_Form_Field name="couponCode"] field must be present in the form.



custom


submit - This outputs a submit button for the custom form.


Additional Attributes for Submit Buttons

label (optional) - Specifies the label to display on the button. The default value is Submit.


color (optional) - Specifies the color to use for the button. Acceptable values are light_blue, blue, green, red, orange, yellow, pink, purple, grey and black.



class (optional) - Allows you to specify a custom CSS class for the button. If this is used the color attribute will be ignored.



 


Usage


[MM_Form type="checkout"]


Coupon: [MM_Form_Field name="couponCode"]

<a href="[MM_Form_Button type='applyCoupon']">Apply Coupon</a>


...other form SmartTags...


<a href="[MM_Form_Button type='submit']">Buy Now</a>

<a href="[MM_Form_Button type='submit' paymentMethod='paypal']">Checkout with PayPal</a>

[/MM_Form]


In this example, I'm using the [MM_Form_Button] tag to create a button that applies a coupon code to the order and to create two submit buttons. The first submits the form using the default payment method and the second allows the user to checkout using PayPal.