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.

Three instances of same select-menu without duplicating in form admin?

  1. gressli
    Member

    Hi,
    I was wondering how I can have three instances of the same select-menu in a form without duplicating it in the form admin?

    I'm creating an application form for a school. When chosing class the different teachers available is listed, using Conditional Logic (One select list for each class).
    I'd like to give the applicant the option of having a 1. choice, 2. choice and 3. choice regarding choice of teacher.

    And I'd hoped someone might help me :)
    Thanks in advance!

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  2. David Peralty

    Why can't you duplicate it in the form admin? I guess I don't understand exactly why the built-in way isn't a valid way of doing it.

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  3. gressli
    Member

    Thanks for getting back to me!
    I'll explain a bit further;
    Say I have a list of 20 different classes. Each class may have up to 10 teachers.. I've created one select-menuwith the classes, and a select-menu of teachers for each class (10 select-menus) with conditional logic depending on the class chosen. If I want to create 1., 2. and 3. choices, how would I do that? Wouldn't I need to create 3 select-menus for each class, 30 select-menus in total?

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  4. David Peralty

    That is correct. As far as I know, there is no easy way to make it so that you can have the data compiled correctly without creating 30 select menus.

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  5. gressli
    Member

    Hm.. Guess I'll have to try then..

    I could use something along these lines: http://pastebin.com/iBziKuFk
    But the 3rd choice is overwriting the others, as the select-choices sent to the form processor aren't in an array ;\

    However, that's a quite dirty hack, I believe.

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink
  6. gressli
    Member

    Hi again,
    just wanted to let you know that I solved it with a dirty hack. But it works.
    http://pastebin.com/NscibjBi

    I used a multiple select-menu instead, as gforms didn't allow an ordinary select-menu to send multiple values. I removed the multiple="multiple" using preg_replace, so I use regular select-menus.

    Posted 9 years ago on Tuesday November 20, 2012 | Permalink