Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    You can add as much text as you like, but not with that kind of markup. Here’s something I’d suggest though:

    https://brausermaimonides.org/donations/business-sponsorship-program/

    This was done by putting the form content ABOVE the form, and using simple javascript to swap out the content when different buttons were clicked.

    Thanks for using Give!

    Thread Starter jjdualan

    (@jjdualan)

    Thanks for the idea.

    Using Javascript, can I create custom buttons and then update the value of this:

    <input type=”hidden” name=”give-price-id” value=”4″>

    Then just hide the default buttons?

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    That’s a bit trickier but also definitely possible. Just make sure it’s updating the final donation total at the end of the form as well.

    Thread Starter jjdualan

    (@jjdualan)

    I thought that the donation total that’s getting passed onto the form is coming from <input type=”hidden” name=”give-price-id” value=”4″> but I guess it’s coming from somewhere else. Can you tell me where it gets the value from? I see the input with ID “give-amount” but changing its value doesn’t seem to carry over.

    Thread Starter jjdualan

    (@jjdualan)

    I took a different approach to get it to work. Created the links, hid the buttons, and then used Javascript to have the links I created trigger the click on the hidden original buttons. Seems to work.

    Is there a way to have a custom field only show up on the modal window?

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Yes, we have documentation on creating custom fields here:
    https://givewp.com/documentation/developers/how-to-create-custom-form-fields/

    In that example it uses the action give_after_donation_levels

    Instead of that, you can use any of these to have the fields show ONLY in the modal:

    • give_purchase_form_after_personal_info
    • give_payment_mode_after_gateways
    • give_purchase_form_after_email

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multi-Level Button Content’ is closed to new replies.