-
pecqguild_webmasterAsked on January 26, 2020 at 8:59 AM
It would be nice to add some non-arithmetic features to the Calculate function.
I would like to set the value of a field to a code according to options the user selects in another field. The user selects from options that are long descriptions and then the form could assign a code to a hidden field.
-
jherwinReplied on January 26, 2020 at 10:06 AM
Can you please explain your question in details?
Do you want to pass value/code to the form calculation widget? It will help us provide you with the appropriate workaround/suggestions if you can elaborate further on what you wanted to do in the form calculation widget.
Looking forward to your response.
-
pecqguild_webmasterReplied on January 26, 2020 at 10:32 AM
Hi Jherwin,
I have a field with the options:
Novice Wall Quilt
Novice Bed Quilt
Advanced Wall Quilt - Traditional
Advanced Wall Quilt - Abstract
Advanced Wall Quilt - Representational
Advanced Wall Quilt - Pattern/Book/Workshop
Advanced Bed Quilt - Hand Quilted - Original Design
Advanced Bed Quilt - Hand Quilted - Pattern/Book/Workshop
Advanced Bed Quilt - Machine Quilted - Original Design
Advanced Bed Quilt - Machine Quilted - Pattern/Book/Workshop
Advanced Bed Quilt - Third Party Quilted - Original Design
Advanced Bed Quilt - Third Party Quilted - Pattern/Book/Workshop
I would like to set one of my hidden fields to a code according to the option selected. Some programming capability like you have for conditional logic would be great!
Select case field:
Case 'Novice Wall Quilt':
Myhiddenfield = 'NWQ'
Case 'Novice Bed Quilt':
Myhiddenfield = 'NBQ'
Case 'Advanced Wall Quilt - Traditional':
Myhiddenfield = 'JAWT'
....
-
VincentJayReplied on January 26, 2020 at 10:57 AM
Yes, you can use the Show or Hide conditions if you want to show a field or hide it based on the user's answer.
Here's a complete guide: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer
Give it a try and let us know if you need further help.
-
pecqguild_webmasterReplied on January 26, 2020 at 11:02 AM
Hi Vincent,
Yes, I have conditionally hidden many fields.
My question relates to extra functionality for your 'Calculate' function.
Barbara
-
VincentJayReplied on January 26, 2020 at 12:10 PM
Are you referring to the Form Calculation widget? If yes, please check this guide: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget
Also, let us know what you want to calculate so we can assist you further.
We'll wait for your reply.