Is it possible in either CF5 or CF6 to create a text box for the user to enter a quantity for the number of repeated elements they need, or to count the number of repeated elements they create?
We're developing a form where we charge a fee based on how many devices the customer is registering, and they have to enter a serial number for each device. Once the form is filled out, it's sent to PayPal or Authorize.net for payment.
I currently have it set up using the multiplier in CF5:
1. They enter the quantity of devices to be registered, which calculates the total price.
2. They click the "add" button to repeat the required serial number input fields.
There is currently no connection (validation) between the quantity they input that generates to total amount, and the number of serial number input fields they create. So it's possible they pay for 4 devices, but fill in 6 serial number fields.
Any suggestions on the best way to accomplish this?
Thanks!
Jeanne
We're developing a form where we charge a fee based on how many devices the customer is registering, and they have to enter a serial number for each device. Once the form is filled out, it's sent to PayPal or Authorize.net for payment.
I currently have it set up using the multiplier in CF5:
1. They enter the quantity of devices to be registered, which calculates the total price.
2. They click the "add" button to repeat the required serial number input fields.
There is currently no connection (validation) between the quantity they input that generates to total amount, and the number of serial number input fields they create. So it's possible they pay for 4 devices, but fill in 6 serial number fields.
Any suggestions on the best way to accomplish this?
Thanks!
Jeanne
Hi Jeanne,
It is possible but not completely straightforward. You can trigger custom Javascript when a new repeater element is added (or removed). That code can check the count and take some action - to hide the + button for example.
See the CFv5 Repeater FAQ for an example that has some broadly similar code.
Bob
It is possible but not completely straightforward. You can trigger custom Javascript when a new repeater element is added (or removed). That code can check the count and take some action - to hide the + button for example.
See the CFv5 Repeater FAQ for an example that has some broadly similar code.
Bob
Thanks Bob. Unfortunately with my extremely limited javascript skills, it doen't get me nearly far enough. Other examples I found (not in CF) were beyond my tinkering skills.
I posted a project in the "Professional help" forum. Hopefully it will find a suitable taker.
Thanks,
Jeanne
I posted a project in the "Professional help" forum. Hopefully it will find a suitable taker.
Thanks,
Jeanne
This topic is locked and no more replies can be posted.