Can I substitute form values in the background?

  • Profile Image
    aspirebrokers
    Asked on March 31, 2016 at 05:39 PM

    Hi Guys,

    Is there a way to substitute values in the background?  For instance in Formstack when someone picks weekly from a drop down this translates into 52 and I can then perform a calculation in a hidden field to multiply their income by 52 to produce their annual income.  This way people can give me their income, before or after tax in any frequency (weekly, fortnightly, monthly or annually) and I can use a calculation in the background to make them all annual before tax and have that value submitted.

    In other instances I may want to substitute a Location name for a location code, or a post code for a location name.  So the user enters their post code but the submitted data is the location of that post code.

    Is there a way to do this in Jotform?

     

  • Profile Image
    Boris
    Answered on March 31, 2016 at 09:04 PM

    Yes, you can use a different value for an option in form calculations and conditions, simply by assigning calculation values to these options:

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    By assigning calculation value "52" to the option "weekly", when weekly is selected on a field it will be forwarding 52 to any calculations.

    > In other instances I may want to substitute a Location name for a location code, or a post code for a location name.  So the user enters their post code but the submitted data is the location of that post code.

    When it comes to using post codes to get an address, while the above method will also work, it may be better to use one of our widgets instead. By using widgets, you can allow your users to use any ZIP code / postal code to get their address. You can add widgets to your form by following this guide:

    https://www.jotform.com/help/252-How-to-Add-a-Widget-to-your-Form

    For example, you can use our Postal code search widget, and here is a demo form demonstrating how this widget works:

    https://form.jotformpro.com/form/51332839595969

    You can also try one of our other ZIP or address widgets:

    http://widgets.jotform.com/search/zip

    http://widgets.jotform.com/search/address

    If you need any further assistance, please let us know. We are here to help.