So I'm looking to have max_installments be a variable based on the current date and, say, a deadline for funds to get to the site. So currently in the donation page template, I have:
<label for="num_installments" class="padbottomless">I want to pay this in <select id='install'></select> installments</label>
where select is a dropdown menu that has a number of options depending on the variable.
Is there a way to make this work through the payment system? How does the
{% collection_select "num_installments", page.donation.installment_collection, class:"select" %}
work through NationBuilder? Currently "allow installments" is unchecked because of we want to customize the max.
Official response from Taylor Pineiro
Please see below
Share this post
Showing 2 reactions
Sign in with
Unfortunately, there’s no way to change how that liquid variable behaves. HOWEVER, If you switch out the liquid object of the installment selector for raw HTML, the selector will still work.
So, for example, you could switch the liquid with this:
I want to pay the following in 12345678 installments
Then, as long as you can figure out how to get those options change based on the date, you should be all set. You could use liquid variables, JavaScript or a combination of both.
Here are some helpful links for the JS part of it:
http://stackoverflow.com/questions/21316690/change-displaynone-based-on-date
http://nationbuilder.com/jerad/liquid_get_current_year