• Resolved bryce1989

    (@bryce1989)


    Hello,

    I was wondering if there is a way to have multiple forms that share one goal and progress bar?

    Thanks,
    Bryce

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Hey @bryce1989 – Currently it would take some code to achieve a combined goal functionality. In a nutshell you would use the following filters:

    https://github.com/WordImpress/Give/blob/release/1.8.17/templates/shortcode-goal.php#L26-L38

    give_goal_amount_raised_output and give_goal_amount_target_output to combine the various form incomes and modify the output.

    Thinking about it, this request seems like a feature we should accommodate within core so we have created an issue to further discuss this additional enhancement to our current [give_goal] shortcode here: https://github.com/WordImpress/Give/issues/2295

    If it’s a really pressing requirement for you we can probably put together a snippet for you. Thanks for your question let me know if you have anymore.

    Thread Starter bryce1989

    (@bryce1989)

    Devin,

    Thanks for the quick response!

    That would be awesome if you could include this in the core! I have more sites I would like to use this with the same way.

    If it wouldn’t be too much trouble, a snippet would be greatly appreciated. We want to use this to raise money for a start up brewery and the sooner we can start raising money the better!

    Thanks for all your help,
    Bryce

    Thread Starter bryce1989

    (@bryce1989)

    Hello, I was just wondering if you were working on a snippet that I could use to get this going!

    Thanks,
    Bryce

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi @bryce1989

    We have an existing snippet which allows you to combine goals into one here:
    https://github.com/WordImpress/Give-Snippet-Library/blob/master/custom-shortcodes/total-earnings-shortcode.php

    Note though that that does NOT have a progress bar. You’d have to code that yourself.

    Watch our progress on Give versions 2.0 and 2.1 for ways we might better support that feature.

    Thanks!

    We need this functionality as well, ideally for Giving Tuesday. I see the snippet above and need help understanding how to make use of it. The shared progress bar would be HUGE. In a perfect world each individual form would have its own goal and all of them would feed into the progress bar on the main form.

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi @malikt that is what a peer-to-peer campaign is like, and we have plans for an Addon like that. The snippet above is only about showing the raw total amount, and is a decent workaround for now.

    Here’s how you use that snippet:

    1) Paste the whole snippet into your theme’s functions.php file or use the free plugin My Custom Functions per our tutorial here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    2) Now place this shortcode wherever you like on your site:
    [givetotal total_goal="9,000" message_before="Hey! We've raised " message_between=" of the " message_after=" we are trying to raise for this campaign!" link="https://example.com" link_text="Help Us Reach Our Goal." multi_id="245, 246, 247"]

    But the only attributes that are required from those above are the multi_id and the total_goal.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘One Goal for Multiple Forms’ is closed to new replies.