I have a requirement to generate a rate calculator accessible to multiple users, each with their own set of criteria and values. I'm using user_meta fields to store the values for each user.
One element is a price threshold / rate pairing but each user may have a differing amount of thresholds so I can't simply fix a set amount of threshold / rate input fields. The user needs to be able to add these as required, one at a time.
eg.
[Property Price 1] / [Marketing Rate 1]
[ADD NEW RATE BUTTON]
[Property Price 2] / [Marketing Rate 2]
[ADD NEW RATE BUTTON]
[Property Price 3] / [Marketing Rate 3]
etc.
After clicking the [ADD NEW RATE BUTTON] it would need to generate a new custom user_meta pairing, numbered incrementally, so the above example would generate the following:
$property_price_1, $marketing_rate_1
$property_price_2, $marketing_rate_2
$property_price_3, $marketing_rate_3
etc.
I have it all working with fixed rate / threshold pairings, but I know the end users will have varying requirements, so don't want to limit them to eg. 10 rate / thresholds. Some may only have 2 or 3, others may have upwards of 20. Hence the need to be flexible with the amount.