How to combine values from two fields with conditional logic

  • NippersD
    Asked on May 25, 2015 at 10:02 AM

    Have dozens of first and last names in a droplist. E.g. Greg Smith.   Would like abilty in calculation tool to apply space delimiter, left text, right text commands and separate text string to form email. E.g. Greg_Smith@domain.com and place this new text string in a hidden text field for use in an email message.   I've looked through the widgets as well for a 2 column drop list format where the first column would be visible (and selectable) in the drop list and the second column entry could be used for the email address. E.g. Greg Smith, greg_smith@domain.com.  I've used a similar feature with one of your competitors before.  Any suggestions on how to accomplish this task? Too many names in drop list to setup logic by each name.  

  • BJoanna
    Replied on May 25, 2015 at 11:28 AM

    If I understood your question correctly you would like to pass values from two dorpdown fields into third field which will be hidden and represent email address. 

    This is possible to achieve with conditional logic to pass values from one field to another. 

    http://www.jotform.com/help/286-How-to-Populate-Field-with-a-Value-from-another-Field 

    Here is a demo form I made. Where values from two dropdown fields are passed to third field. 

    http://form.jotformpro.com/form/51444171434954?  

    How to combine values from two fields with conditional logic Image 1 Screenshot 30

    How to combine values from two fields with conditional logic Image 2 Screenshot 41

    Considering that email address can not contain "space"  value I used "." inside of name field.

    You can clone my form for closer inspection.

    http://www.jotform.com/help/42-How-to-clone-an-existing-form-from-a-URL

    Hope this will help. Let us know if you need further assistance.  

  • NippersD
    Replied on May 25, 2015 at 2:05 PM

    In the conditions wizard, for "output to Field", how did you get to rename the text box to "textbox field(id4)" - I'm only able to select assigned field names in this output, and thus not able to pass the newly created email string.  I've cloned your report but not able to figure out how you've made this assignment.  thanks

  • BJoanna
    Replied on May 25, 2015 at 2:24 PM

    In the conditions wizard, for "output to Field", "textbox field(id4)" is default value because i did not rename default text box label "Click to edit". If you rename label to e.g. "Test" then in the conditions wizard, for "output to Field" there will be "Test" field as well. 

    How to combine values from two fields with conditional logic Image 1 Screenshot 20

    http://form.jotformpro.com/form/51445927235963? 

    Hope this will help. Let us know if you need further assistance. 

  • NippersD
    Replied on May 25, 2015 at 4:15 PM

    This works perfectly! - thank you.  I thought the issue was with the Output to Field but it was in the conditions wizard, as the fields selected defaulted to 0-9, instead of a-z.   Again, thank you for your quick and extremely helpful reply today.

  • BJoanna
    Replied on May 25, 2015 at 4:33 PM

    You're welcome.

    Feel free to contact us if you have any other question.