I am setting up a fundraising page here. At the bottom of this page is a donate form. In the middle of the page are suggested donation amounts ("give $25," "give $50," etc.). Is it possible to have the "your pledge" field show a default value based on clicking one of the "give" links? So clicking "give $25" enters a default value of 25, etc.
I found code here, but it's not working or I'm not setting it up correctly.
Thanks in advance if anyone can help me work this out.
You can do this using jQuery. You have monitor the click events for the pledge links then apply the value to the field in your form. You may have a problem with your site. When I was checking your page, you have script files that are not being loaded because of a mismatched mime type. You need to fix that because any js error could prevent jQuery from working.
Ok, thanks Victor. I'll take a better look.
I just looked at your website. If you view the source of the page you'll see one lines 437-447 you have script tags that have a PHP script in it. That's no good. Fixing that by moving the PHP code to the server will get rid of one of the major errors in the console.
Thanks @Victor Font and @Rob LeVine for taking time to comment. I did end up solving this by just using the shortcode [get param="amount"] as the default value in the donation amount field, and forcing the page to reload. I found this somewhere in the Formidable documentation but it took quite a bit of hunting. Here is the live site.
Please login or Register to submit your answer