# How do I charge pro-rated dues?

• LSGN
Asked on March 19, 2017 at 11:17 PM

For my membership dues, I need to charge pro-rated dues based on date. Like April 1-June 30 = \$7.50 per year, July 1-June 30 = \$30 per year, October 1-June 30 = \$22.50, January 1-June 30 = \$15.00. Is there a way to do this automatically based on date so I don't have to go in and change it each quarter?

• Charlie
Answered on March 20, 2017 at 03:55 AM

I'm sorry, I'm quite confused how your pricing works. Do you have a formula? If so, then perhaps you can use conditional logic, form calculation widget and "Variable Price" option in your form.

Here's a sample form: https://form.jotformpro.com/70781413717962

Here's how I did mine:

1. First I added a date field and two form calculation widgets

2. Now the date field can be set to default current date, or depending on how you design your form. In my case, I just let the user pick a date.

Now we have a form calculation widget titled "Convert date to String". Open the widget and follow the screenshot below. Basically, we will use the function dateString() to convert the date value to a more readable text.

3. You can find the dateString() function by clicking the "..." button.

4. This is how the date is converted to a text string, you can see words now. We basically want to see the words for the months. In this example, we are seeing "Mar" for "March".

5. Now we will add conditional logic that will read the converted date strings' month. Below you can see the complete conditions that I set up.

January-April = Subscription 1 pricing is 10.

May-August = Subscription 1 pricing is 12.

September-December = Subscription 1 pricing is 14

6. Here's how it is setup in one of the conditions.

IF "Convert Date to String" contain words "Jan,Feb,Mar,Apr"

THEN

Insert value 10 to form calculation widget "Subscription 1 pricing".

Now, mine is straightforward value, you can of course set your own pricing or if you have calculations. This is just basically setting up a price for my subscription #1.

7. Now after that, open your payment wizard, edit the subscription. You should be able to see the option "Variable Price". Enable or set that to "Yes" and you should see the option "Get Price From". That will allow you to set the source of the pricing for this particular subscription. In my case, I set the source price to the form calculation widget titled "Subscription 1 Pricing".

You can go ahead and test my form, you can see that the subscription pricing in the payment field is changing based on the date month you have set.

I hope that helps.