• Resolved dambacher

    (@dambacher)


    Hi Gabriel,

    When using shortcode like this:

    [mycred_buy_form amount=”1,5,10,20″ gateway=”paypal-standard”]

    The “buy now” button displays above the “Select Amount:” dropdown.

    Is there a simple way to change this to have the button appear below the form?

    Thanks

    http://wordpress.org/extend/plugins/mycred/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hey dambacher

    The Buy Now button comes after amount and receiver but before the optional balance and limit box. It has the CSS styling float: right, you could change this and apply more CSS rules to move it around.

    If the default CSS styling is “in the way” for you, you could always disable styling completely and set your own CSS styling.

    Thread Starter dambacher

    (@dambacher)

    Thanks, so this is expected behavior here:

    View post on imgur.com

    Thread Starter dambacher

    (@dambacher)

    It seems like it should come after

    Plugin Author myCred

    (@designbymerovingi)

    The button is floated right, but when the form is not wide enough, it floats above the amount. Add CSS styling to your theme where you remove the float for the button and it should jump below.

    Thread Starter dambacher

    (@dambacher)

    Cool, thank you.

    Thread Starter dambacher

    (@dambacher)

    Hi Gabriel, would it make sense to just remove this:
    <input type="submit" name="submit" value="' . $button . '" class="mycred-buy button large" />';

    From line 574

    And change lines 680 and 681 to this:

    <input type="hidden" name="token" value="' . wp_create_nonce( 'mycred-buy-creds' ) . '" />
    <input type="submit" name="submit" value="' . $button . '" class="mycred-buy button large" />

    Seems to work for me then no styling is needed as the button will show up under all form choices.

    Make sense?

    Thread Starter dambacher

    (@dambacher)

    I’ll try to make that a little clearer.

    in myCRED-addon-buy-creds.php

    I changed line 573 from this:
    <form method=”post” action=”” class=”‘ . implode( ‘ ‘, $classes ) . ‘”>

    To this:
    <form method=”post” action=”” class=”‘ . implode( ‘ ‘, $classes ) . ‘”>’;

    I moved line 574 to line 681 just after this:
    <input type=”hidden” name=”token” value=”‘ . wp_create_nonce( ‘mycred-buy-creds’ ) . ‘” />

    So line 680 and 681 now look like this:
    <input type=”hidden” name=”token” value=”‘ . wp_create_nonce( ‘mycred-buy-creds’ ) . ‘” />
    <input type=”submit” name=”submit” value=”‘ . $button . ‘” class=”mycred-buy button large” />

    Is that a decent way to do this do you think?

    Thanks

    Plugin Author myCred

    (@designbymerovingi)

    Hey

    It makes sense, Ill have a look at it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Button under form’ is closed to new replies.