How to use predefined list of quantity instead of text input field on signup form

From aMember Pro Documentation
Jump to: navigation, search

First of all you need to enable option 'allow user to change quantity' in product settings. aMember CP -> Products -> Manage Products -> (edit)

You need edit your signup form at aMember CP -> Forms Editor -> (edit) and add Javascript brick to your form.

Then click configure link on this brick and put the following code in brick configuration:

    jQuery('.am-product-qty').css({opacity: 0, width: 0, padding:0}).after('<select>\
        <option value="1">1</option>\
        <option value="2">2</option>\
        <option value="3">3</option>\
        <option value="4">4</option>\
        <option value="5">5</option>\
        jQuery('.am-product-qty', jQuery(this).closest('label')).val(jQuery(this).val()).change();

Save your form and test it.