Form Advice - More Advanced Lookups and Drilldowns Total

By: Scuts Sgr | Asked: 02/02/2023
ForumsCategory: How-toForm Advice - More Advanced Lookups and Drilldowns Total
Scuts Sgr asked 1 year ago

Looking for advice on creating a form. I think that I need a combination of drill down, populate fields by searching values,  conditional calculations, and having a hidden field that does a Math.floor calculation— but could be wrong. Need to put multiple options together to accomplish: Salon 1 and Salon 2 have slightly different pricing.

I have spreadsheets that lay out exact info and can be uploaded as .csv

Example on some differences: Salon 1 auto adds a tip of $10 for work that totals $55.98 — the $10 is for work that goes from $55 to $55.99 Salon 2 auto adds $14 for work that totals $55.98. Work total rounding down to dollar amount.

Field A: dropdown lookup

Field B: typed $ amount, rounded down. (Or ok with having it be a drop-down selection)

C: $ amount - pulled from Field A and B combined.

When a user selects “Salon 1” for “field A” and types  number from  $55 to $55.99 into “field B” then C=$10; but if Salon 2 is in the “A” field, then C=$14

Is this possible?

What would the csv look like for that?

Have to do individual rows for all $ amounts and Salons?

Better to separate into 2 different csv and lookups? Salon 1’s pulls pricing from a separate .csv upload and entries— its field calculations only show if Salon 1 is selected from the drop-down. then Salon 2 has different fields for calculations that show if Salon 2 selected? Maybe Dynamic fields is better?

Or do some sort of conditional if-then calculations with field IDs?

Or am I overthinking things?

Thoughts and advice are appreciated. Thank you!

---

OR, maybe do something like option-2 screenshot -- where user types in an amount, it rounds down (in an admin-viewable field) then that number is used to lookup the total for "C"?

Attachments
1 Answers
Bobby Clapp answered 1 year ago
I would create a form (I call these feeder forms, i.e., FDR_FORM_NAME) that holds the Salon name and the tip amount associated with the salon. Then in the form the public will end up using, add the salon name as a lookup field. Add a text field that will "watch" the lookup field and pull in value from the feeder form from the second field. This text field visibility will be administrator only, not visible to the public. Add the third field as the dollar value the public would type in. Then the fourth field of the public form is going to do the calculation of the admin only field (not seen by the public) plus the dollar field the public does see. If you want them to see the tip value, simply make it everyone and then read only.
Scuts Sgr replied 1 year ago

Hi—
Thank you for your input.
Unfortunately, there is no exact math calculation; I was told that all math is “roughly” but the excel spreadsheets info is what will be used.

I’d rather avoid creating a longer, more detailed .csv with separate numbers and info for each salon.

There are several salons; about 4 different pricing tables used in total.
I think that I may have to do a longer, more roundabout setting that uses conditionals and separate lookups based on those conditionals. User must first select a salon, then the options come from there.

I wanted to get something in place that would be simpler to update if/when some amounts need to be modified. And that wouldn’t require users to “round down” their own dollar amounts.

Ideally, it could be some sort of “if…and…then” statement, but that seems like overkill.

Or at the very least, allow users to enter an amount, round that down, then use that total to look up the corresponding option from the entry table. Then users would be able to type a total, rather than round it down themselves.

I don’t see how that would work, though. I’ll check some snippets, but may just have to do the longer build. Maybe something like "Option 2" that I amended to the original post
Do you have any ideas?

Thank you again.

Bobby Clapp replied 1 year ago

This is a tougher topic that what can be covered in this forum. I recommend reaching out to a 3rd party for paid assistance -> https://formidable-masterminds.com/developers-directory/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right