nican VIP
Total posts: 392
05 Mar 2014 20:18

hello, I was wondering what is the better method to do this:

create "price" filed for an event which should work like this:

option1: free option2: payment due

if option 1 "free" is being chosen, the value "free" is being inserted

if option 2 "payment due" is being chosen instead, then a dropdown menu open up with a list of numbers from 1€ to 1.000€ so he can select the exact price, he selects eg 150€ and the value "payment due: 150€" is being inserted

at first I thought about using multiple level select field, but then I realized that it could nopt work well t display the list of numbers from from 1€ to 1.000€

do you think I have other possibilities for what I want to do?

thank you

Last Modified: 06 Mar 2014

Comments have been disabled for this article and works only in read only mode.

Sergey
Total posts: 13,748
06 Mar 2014 05:56

This is how I would do it without creating dedicated field.

  1. I would add 2 fields. One price type with free and due options and the other is digits for actual price.
  2. I would create custom form template.
  3. I would insert price filed hidden by default.
  4. At the bottom I would add javascript and attached event to ptrice type select field. When it is due I would unhide second field.

Something like this.


nican VIP
Total posts: 392
06 Mar 2014 08:11

thank you!

Powered by Cobalt