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

From aMember Pro Documentation
Revision as of 06:31, 14 December 2016 by Caesar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Please 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:

    $('[for=product-5-5]').after('<hr />');
    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.