PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Using GF dropdown instead of currently form

  1. Pete
    Member

    Hi.
    I´m currently using the form below with a script to push a selection to a php-file with shows the choosen sql-entries in a table.
    How can i use a GF dropdown form instead (i´m a php-beginner and need it explained ;-)

    <form>
    <select name="users" onchange="showUser(this.value)">
    <option value="">Model:</option>
    <option value="1">Samsung Galaxy S 3</option>
    <option value="2">Nokia Lumia 800</option>
    <option value="3">HTC One X</option>
    <option value="174">Apple iPhone 4 8GB</option>
    </select>
    </form>

    Posted 11 years ago on Monday May 21, 2012 | Permalink
  2. Pete, can you give us some more detail here as to what you are trying to do?

    Posted 11 years ago on Monday May 21, 2012 | Permalink
  3. Pete
    Member

    I´m using a javascript to make a table from specific SQL-entries. I select which entries to show with a normal dropdown form (see above), but would like to use a Gravity Form instead (easier to edit and nicer looking etc.).
    I think i have to do something with the
    <select name="users" onchange="showUser(this.value)">
    from the current form, but do not know where to put it on a GF dropdown form.

    Posted 11 years ago on Monday May 21, 2012 | Permalink
  4. Pete, you will need to use jQuery to set the onchange property of the drop down.
    The easiest way to do this is adding the javascript code to an HTML field in the form.
    Following is a code snippet to point you in the right direction. You will need to replace the XXX with your actual drop down ID.
    http://pastie.org/3945196

    Posted 11 years ago on Monday May 21, 2012 | Permalink