Title: multiple options form
Last modified: March 27, 2025

---

# multiple options form

 *  Resolved [benlashley80](https://wordpress.org/support/users/benlashley80/)
 * (@benlashley80)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/)
 * I need suggestions on how to do this more efficiently please. I am an insurance
   salesman and i offer several levels of coverage. i’m trying to build a form where
   clients can choose what coverage they want a quote for. I have 16 different price
   points for each age group and I have 11 different age groups. So thats 176 price
   points per product and I have 4 products available that I want built into the
   form. right now i’m just creating a number field for each price point and having
   it hidden unless the correct coverage is selected by the radio buttons. I inserted
   an image of it to help you understand how i’m doing it. this isn’t sufficient
   because when rates change I have to painfully navigate 704 number fields and 
   change them one by one. Please tell me there is an easier solution to this! Thanks.
 * This is my sales app that I use in the field, I don’t want all the prices shown
   in my form, i just want the price to populate when they select the coverage. 
   the second part of this image is my calculated form, right now if they select
   individual, single parent, couple, or family, and choose a level, unit 8, unit
   4, unit 2, or unit 1, I have a hidden calculated form that ads the sum of each
   radio button, then the form will display a number field based on that number.
   this seems like a long work around, it works but is there a better way?
 * ![](https://i0.wp.com/votesplease.com/testvote/images/IMG_3205.jpeg?ssl=1)
 * This is my form, i
 * This is my form, I basically have 704 dependency rules that will show the correct
   number field which has the price pre set in it. please help me make this more
   efficient thanks!
 * here is a link to the actual form where I am building and testing it: [https://votesplease.com/testvote/application/](https://votesplease.com/testvote/application/)
 * ![](https://i0.wp.com/votesplease.com/testvote/images/IMG_3206.jpeg?ssl=1)
    -  This topic was modified 1 year, 2 months ago by [benlashley80](https://wordpress.org/support/users/benlashley80/).
    -  This topic was modified 1 year, 2 months ago by [benlashley80](https://wordpress.org/support/users/benlashley80/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18384823)
 * Hello [@benlashley80](https://wordpress.org/support/users/benlashley80/)
 * Your solution is not optimal. A better alternative is to enter an object with
   the data definition and access this object directly from the equations.
 * For example assuming you have three fields in the form:
 * fieldname1, a dropdown field for products with values: Accident & Injuries, …
   
   fieldname2, a dropdown field for types, with values: Individual, Single parent,
   Couple, …fieldname3, a dropdown field for units, with values: 8, 4, 2, and 1
 * Now you need only to insert an “HTML Content” field in the form (tick the checkbox
   in its settings that allows you to enter script tags in its content), and enter
   an array of objects:
 *     ```wp-block-code
       <script>db = [{product: 'Accident & Injuries', type: 'individual', unit: 8, price: 78},{product: 'Accident & Injuries', type: 'individual', unit: 4, price: 42},{product: 'Accident & Injuries', type: 'individual', unit: 2, price: 24},{product: 'Accident & Injuries', type: 'individual', unit: 1, price: 15},/* The other tuples with the complete database */];</script>
       ```
   
 * Finally, the equation that determine the price is as simple as:
 *     ```wp-block-code
       (function(){for(let i in db) {if(AND(db[i]['product'] == fieldname1, db[i]['type'] == fieldname2, db[i]['unit'] == fieldname3)) return db[i]['price'];}return '';})()
       ```
   
 * And that’s all.
 * I needed only the fields to allow the users to enter the data for filtering, 
   and an “HTML Content” field for entering the array of tuples (the tuples can 
   include as much information as you want).
 * Using DS fields, you can enter your tuples in Google Sheets (a database, a JSON
   object, or simply a CSV file), and use them from the form:
 * [https://cff.dwbooster.com/blog/2019/02/14/ds](https://cff.dwbooster.com/blog/2019/02/14/ds)
 * This alternative allows you to update the Google Sheets document; the form will
   use the new data without editing it.
 * Best regards.
 *  Thread Starter [benlashley80](https://wordpress.org/support/users/benlashley80/)
 * (@benlashley80)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18384856)
 * Im not sure I can do that on my own but it definitely sounds way better. Thank
   you for the tip and I will give it a try!
 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18384864)
 * Hello [@benlashley80](https://wordpress.org/support/users/benlashley80/)
 * The process is straightforward, but assembling the dataset is a tedious and repetitive
   task.
 * Best regards.
 *  Thread Starter [benlashley80](https://wordpress.org/support/users/benlashley80/)
 * (@benlashley80)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18384896)
 * ok this works great with the dropdowns, is there a way to make it work with radio
   buttons?
 * *edit – after i wrote this i realized all I needed to do was change the calculated
   form to calculate the feild name of the radio buttons and it works the same there.
   Thanks again for the advice!!
    -  This reply was modified 1 year, 2 months ago by [benlashley80](https://wordpress.org/support/users/benlashley80/).
 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18385244)
 * Excellent !!!
 * Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘multiple options form’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/multiple-options-form/#post-18385244)
 * Status: resolved