Mark Buelsing
river guide Posts:241
|
10-25-2010 11:07 AM |
|
Please help me with the proper way to do this.
I have a standard shipping fee for all my products since they are the same size and weight. I added the cost (value) into the DNN lists table. On my DF form, I have a textbox with a SQL Driven Default Value that gets my standard shipping cost from the table. The textbox does populate with the shipping value when it is visible. However I want the standard shipping cost field to be hidden because I simply use the value in a javascript calculation.
Here is the problem:
When I change the Shipping Cost field type to "Hidden", the SQL Driven default appears to stop working since my javascript calculation returns 0's now.
So what I ultimately want is a way to retrieve the standard shipping cost from the Lists table and use it in a calculation while not actually showing the standard shipping cost on the form.
What is the better way to do this please? |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
10-25-2010 12:48 PM |
|
Hello Whetstone,
As my recommendation, anytime dealing with JavaScript calculations and Dynamic Forms, you should place the on client side event (your javascript) in all of the fields that are affected. Place the exact script in the Module Configuration -> Custom JavaScript File "Initial JavaScript"
And place it into any other fields client side event multi textbox, if they take part in the calculation.
How many fields are involved in this calculation??
What version of DNN and Dynamic Forms are you running??
Thanks,
Ryan |
|
|
|
|
Mark Buelsing
river guide Posts:241
|
10-26-2010 07:47 PM |
|
Ryan, thanks for your reply. The javascript is already in all those places. It calculates fine when the field that contains the shipping fee is visible, but stops working when that field is changed to be hidden. The question is, how do I get a value from a table on form open, while keeping the field that holds the value hidden, while still keeping that value available to a javascript calculation? Thanks |
|
|
|
|