What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Custom field values

    Asked by johnrrrinc on May 01, 2011 at 12:49 AM

    I'm creating a drop down menu and I can't see how to assign custom passing values for my options.  I'd like to be able to define the value to each one of my options but I'm afraid I do not know how to enter it.

    For example:

    <option value="113523">AA in Communications</option>
    <option value="174761">AA in General Studies</option>
    <option value="120273">Bachelor of Arts in English</option>
    <option value="113573">BS in Communication - Communication and Technology</option>
    <option value="113575">BS in Communication - Culture and Communication</option>
    <option value="113577">BS in Communication - Marketing and Sales Communication</option>
    <option value="120275">BS in Environmental Science</option>

    Thank you for your help.

  • Profile Image
    JotForm Support

    Answered by liyam on May 01, 2011 at 01:20 AM

    Hello johnrrrinc,

    Unfortunately, you cannot do that in your form while your published form is hosted in JotForm.  But I will suggest this to our development team and let them consider on having this implemented.

    What I can suggest to you for now is get the source code of your form and place it on your webpage. Then you can edit the values of your list there.

    To get the source:

    1. Edit your form, Click Setup & Embed > Click Embed Form

    2. An Embed Form Wizard will show up with tons of options on how you wish your form to be embedded.  Under Display it on your site, click Source

    3. Click the source code to copy it and paste it on your site.  Or you can download your source code with the CSS and javascript files to be able to more freely customize your site.

    4. Once you have pasted your form's source to your page, edit your options' values.

    If you have other concerns or inquiries, please do let us know.

    Thanks and warm regards.

  • Profile Image

    Answered by johnrrrinc on May 01, 2011 at 01:27 AM

  • Profile Image

    Answered by allanftd on May 01, 2011 at 03:28 AM

    Hi johnrrrinc,

    Thanks for your feedback, but it appeared blank. Kindly send it again if we can be of further assistance.

    JOTFORM SUPPORT

     

  • Profile Image

    Answered by bunkle on November 21, 2011 at 10:27 PM

    I do hope the development teams work on implementing this as I think this inability, although making form concepts simple, is overly limitting. 

    In the meantime here are a work-around and a ... ahem .... hack that can get you what you want.  Maybe...

    Option 1.  Let your value be a combination of the values that will be clear in context.   Ex:

    <option>113523: AA in Communications</option>
    <option>174761: AA in General Studies</option>
    etc.

    so that the values will read "id: title".  Although awkward it *does* get both info across.  And *if* you are comfortable with programming the post submit functionality the data is easily manipulitab... manipulativabl... manipa... can be changed and played with.  For instance, if the final result is an excel spreadsheet, you can (you can, I can't; I suck at Excel) split the values on the colon.

    If the final result is a redirect "thank you" page URL you can post manipulate easily *if* you are comfortable with that.  For example in PHP you could do:

    list($id, $title) = explode(":", $_POST['degree']);

    and thus $id == 113523 and $title = "AA in Communications".   ("explode" is a nice little PHP function that lets us split a value into pieces by breaking it, in this case, on the colon.  If the programming is some other language than PHP you can do a similar thing by figuring out substrings etc.)

    Option 2:  This is really kind of a nasty hack and I'm surprised it worked but it did.  If you put your value to be "AA in Communications<!--113523-->", the "<!--113523-->" will be invisible to everyone but it *will* be sent.  Of course, making use of it will be another issue.  But, again, if you have a comfort level in programming you can will luck and determination, suck it out llike the last bit of lobster.

    (In PHP you can do:

    $title = preg_replace("/\<\!\-\-(.*)\-\-\>/", "", $_POST['course'], $match);
    $id = $match[1];

    that sucks it out nicely with very little blood on your bib.)

  • Profile Image
    JotForm Support

    Answered by idarktech on November 22, 2011 at 03:38 AM

    Thanks for the great input bunkle, our team will surely appreciate that. If you have any other concern, just let us know. Thank you for using JotForm!