-
SpiceweaselsAsked on August 7, 2016 at 9:23 PMAlso, the calculation field that looks like this:
Isn't calculating, according to the formula I've set.
What's supposed to be happening is this:1) The user selects the number of bedrooms, bathrooms, and kitchens from the first set of drop downs
2) The ~options~ (not the values) from that set of drop downs are displayed (as in the second graphic I've inserted in my question, above).
3) The options are passed to the second set of (hidden) drop downs.4) The ~values~ (not the options) from the drop downs are used in the calculation fields (Such as the "One Time Only" field, above).
-
Chriistian Jotform SupportReplied on August 7, 2016 at 11:29 PM
The calculations may be incorrect due to the hidden dropdown field's calculation values. Please note that if there are 6 options, there should also be 6 calculation values only. An empty space should be left at the top of the calculation values, which will represent the empty option from the dropdown.
For more info on assigning calculation values, please check out this guide: How to Assign Calculation Value.
Here's your current calculation values.
Here is how the calculation values should look like.
Once the calculation values are correct, the calculation should now show the correct price.
Here are the values from my test form.
round (( 2 Bedrooms (Value of 2.5) + 2 Bathrooms (Value of 3) + 1 Kitchen (Value of 1) ) * 25)
Regards.
-
SpiceweaselsReplied on August 8, 2016 at 3:38 AM
Thank you for attempting to help. I truly appreciate it. I'm afraid I still don't understand, alas.
The only way I've found to have the calculation field, "One Time Only", work at all is to include numerical ("0-9") values from the "BedroomA", "BathroomA", and "KitchenA" fields in the calculation field's formula. But those fields ("BedroomA", "BathroomA", and "KitchenA") don't have calculation values at all. They're blank.
However, when I change the calculation values in the "BathroomB" field--which is the hidden "Bedroom" field (Input146), ~nothing~ happens to the prices in the "Your Booking Summary" fields.I'm not understanding:
Where is the calculation field getting its values from?
And how can I change them?When I changed the calculation values within the "BathroomB" (Input146) field from these values:
(no space)
1
2
3
4
5
6to these values:
(space)
10
20
30
40
50
60, the prices didn't change at all.
I need to understand where the calculation field is getting its values from so that I can modify them.
Thank you, thank you! -
Chriistian Jotform SupportReplied on August 8, 2016 at 5:02 AM
As of your current setup, your "One Time Only" field is getting its values from the options in the dropdown field. Since the "BedroomA", "BathroomA", and "KitchenA" don't have calculation values, the form calculation widget instead gets the values from the numbers in the dropdown options (ex: 1 bedroom, 2 bedroom).
If you want to use calculation values, you will need to add calculation values into "BedroomA", "BathroomA", and "KitchenA". In my cloned version of your clone, I used 0 in the first line instead of an empty space, then I added calculation values from 10 to 60.
Here's the cloned version of your form where the visible dropdown fields have calculation values so you can see it in action: https://form.jotform.com/62202520884955. The "One Time Only" field successfully calculates the calculation values from the visible dropdown fields.
You can also clone the form to your account to see how I set it up: How to clone an existing form from a URL.
Regards.
-
SpiceweaselsReplied on August 8, 2016 at 12:10 PM
Okay. I understand what you're doing. But there's still one thing we're missing.
I need to be able to pass the BedroomA's value to the calculation field and its options to another field (the "BedroomC" field). That enables me to change the values without changing what the user sees.
I was taught how to do that by JotForm support in this thread: this thread (Mike G is the one who finally cracked that problem, way down at the bottom of that thread), and I made his solution work in one of my forms, but I can't seem to make it work here on the "BedroomA/BedroomB/OneTimeCleaning" fields in my "Book Standard" form.
That is the reason I created the 3 hidden fields (BedroomB, BathroomB, KitchenC,) in the form I'm working on now, "Book Standard."
Your solution (for which I really am grateful! :-) ) makes those fields irrelevant, correct? It makes it so that the user will see if I change the values of BedroomA field.Again, I want to pass the BedroomA's value to the calculation field and its options to another field (the "BedroomC" field). That's what I was using the hidden fields for.
The reason this is important is that the values need to be able to be adjusted without the user seeing it. For instance, let's say that the options of "BedroomA" are 1 Bedroom, 2 Bedrooms, and 3 Bedrooms, but the values of those options should be 1.5, 2.7, and 4. Still, the BedroomC field should say "One", "Two," and "Three" (or "1," "2," and "3" or "One Bedroom," "Two Bedrooms," "Three Bedrooms" or "1 Bedroom," "2 Bedrooms," "3 Bedrooms" -- doesn't matter which). That's what I was using the hidden fields for.
See? -
Support_Management Jotform SupportReplied on August 8, 2016 at 1:03 PM
Thanks for the additional info, we're finally down to a few tweaks and your form is ready. I reviewed your entire exchange with my colleague and cloned your form. I'm seeing the calculations are working now as expected. All that's left is to have the values of Bedroom A passed to Bedroom C so it's more user friendly (e.g. display it as 3 Bedrooms instead of just 3)
Please allow us some time and I'll work on a cloned copy of your form. As soon as I have it ready, I'll update this thread. Thanks for your patience.
-
Support_Management Jotform SupportReplied on August 8, 2016 at 1:33 PM
All right, I had to disable the first 6 conditions (conditions 1 to 6) you have on your form to get this work. For your reference, I only disabled all the update/calculate conditions for the Bedroom, Bathroom, and Kitchen like so:
After disabling those, I added 3 conditions:
Here's a short clip to better show you how it was done:
To insert that space in between the field value and the word Bedrooms/Bathrooms/Kitchen, hit the SPACE BAR right after adding the field into the calculation, then press TAB. After that, type in Bedrooms/Bathrooms/Kitchens as needed per condition.
Here's a working demo of my cloned form https://jotform.com/62205242621948 Feel free to clone it so you can check.
Hope this solves your problem :)
-
SpiceweaselsReplied on August 8, 2016 at 2:35 PM
Unfortunately, this doesn't solve the problem. Here's why:
If I change the values of "BedroomA," so that it changes the calculation field "One Time Only" as it should, it also changes the "BedroomC" field to read, "10 Bedrooms." That is not what I want.Instead, when the user chooses "1 Bedroom" from the "BedroomA" drop down, the "BedroomC" field should still be showing "1 Bedroom" to the user in both the "BedroomA" dropdown and in the "BedroomC" field down in the "Your Booking Summary" section, even if the calculation value of that option has been changed.
My goal is to be able to change the calculation values for the Bedroom field, without the user seeing those values.
The user should only see the options, not the values, and the options should be passed to the fields in the "Your Booking Summary" area.
That way, I can make the value of the "1 Bedroom" option be, say, 2.6 or 1.3 or 17, but the user would still see only "1 Bedroom" in both the dropdown and in the "Your Booking Summary area."
I'm so sorry to keep telling you it's not working. I know you're trying to help. And I appreciate your time, truly I do. Thank you. I wish I could give you a hug.
-
Nik_CReplied on August 8, 2016 at 3:41 PM
If I understand what you mean, you want to use the value of a dropdown field in calculations and the text value from the dropdown to be copied into the final calculation.
I will have to perform some tests so I will need more time to provide a solution for you. I will get back to you as soon as I have some update.
Thank you for your patience.
-
SpiceweaselsReplied on August 8, 2016 at 3:49 PM
Thank you, Nik (and Jim, and Chriistian!). I shall wait patiently.
-
Nik_CReplied on August 8, 2016 at 6:00 PM
I have tested the issue you have reported and the dropdown seems to be working with values by default. If there are calculation values set it will take them instead of the text values. We can make a feature request to our developers if you consider this a crucial part of your form.
-
SpiceweaselsReplied on August 9, 2016 at 12:31 PM
Yes, please do make a feature request.
This function, is absolutely essential, for two separate purposes, on my form.
Thank you so much! -
Mike_G JotForm SupportReplied on August 9, 2016 at 5:40 PM
If I'm understanding what you would like to happen with your form, Book Standard, correctly, I believe, the workaround you need is somehow should be similar to the the one I gave you on this thread, How-can-I-pass-a-radio-button-s-options-rather-than-those-option-s-values-to-a-text-field-further-down-in-my-form
Here's what you need to do:
1. Add another drop-down field that has similar options with the "Bedroom" field in your form. Label that field "Bedroom(Hidden)" or anything that would not set any confusion later on.
2. Set calculation values for the options in the "Bedroom (Hidden)" drop-down field. Please note that you need to set a value of "0" for the empty or blank option of the drop-down field.
3. Create a condition that will pass the text value of the "Bedroom" field to the the textbox field, "Bedrooms", under "Your Booking Summary".
4. Make another condition with the same details but this time the SUMMARY should be the "Bedrooms (Hidden)" field.
Please note that for the two conditions above the value that needs to be passed should be in text format:
5. Update the content of the Form Calculation widget, "One Time Only". Change the tile, "{bedroomA}", to {bedroomhidden}. It should still be in number format.
Here's how it should work after you have applied all the changes above.
Demo form: https://form.jotform.com/62216638691966
You can do the same to all of the other fields: Bathroom, Kitchen, and Storeys.
Please don't forget to hide the field(s) labeled as (Hidden). Also, in my sample form above, I have used the calculation values
Also, in my demo form above, I have used the calculation values 1.5, 2.7, and 4 for 1 Bedroom, 2 Bedrooms, and 3 Bedrooms, respectively.
I hope this helps. Please let us know if you have questions with any of the instructions given above. Thank you.
-
Mike_G JotForm SupportReplied on August 9, 2016 at 6:03 PM
I forgot to mention that before you proceed in doing the instructions I have given above you need to do the following first to avoid confusion:
1. Please delete ALL the Update / Calculated Field conditional logic from the condition list except for these two:
Here's how:
2. Please delete the "BedroomB" drop-down field, too.
3. Also, please empty the calculation values of the "Bedroom" drop-down field.