How to Pull Multiple Data Points from Single Data Table into Hidden Fields in Same Form?

By: Mark Hansen | Asked: 09/18/2024
ForumsCategory: General questionsHow to Pull Multiple Data Points from Single Data Table into Hidden Fields in Same Form?
Mark HansenMark Hansen asked 2 months ago
Hi All - FP Elite user stumbling on a task and hoping it's an easy solution. I go brain-dead on these at times and the FPPro website docs are not always easy to find a solution. I have a data table that contains 13 fields with various bits of information about a single product type. In total, there are 10 product types in this table. For the purpose of this example, lets say the data table contains: 
  • Product Type (Text name)
  • Description (Text desc)
  • Wholesale Cost Per Item ($/ea)
  • Bulk Cost Per Item ($/ea)
  • Retail Cost Per Item ($/ea)
  • Several other fields of data related to the product type.
In the front-end form, I use a lookup field to display the Product Type in a dropdown. In a second field, the user chooses whether or not they'll be purchasing in Wholesale, Bulk or Retail pricing based on the quantity they plan to purchase. (I'm generalizing). If the user chooses "Wholesale", how do I pull the "wholesale cost" data from the data table into a hidden field to calculate pricing? Do I need to completely rethink this into an application / relational db type system, or can FPPro handle it from a single data table? Thanks in advance,
Mark  
1 Answers
Best Answer
Mark HansenMark Hansen answered 2 months ago

Disregard as solved: This aged well in all of 5 minutes of more internal cranium logic.  I'll return and explain after it's completed.

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