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.

Before I buy GF...

  1. raffe
    Member

    I have some questions about the pre-populating method of a drown down menu before I buy the plugin.

    I'm making a new web page for a small Swedish contact lens company and they want to have a form based ordering system like the one they already have on http://www.oculus.se/bestalla/

    Q1: Under the title "Referens 1" you can see a input set with two drop down menus, based on the right (Högerlins) or left (Vänsterlins) contact lens. The name of the contact lens should appear in the drop down menu as in the old web page, but today the contact lenses are as Posts on Wordpress. Can I pre-populate the two different drop down menus with the same post names and if cat=99 and the post is published, not draft or private?

    Q2: Can I repeat the re-population for ie "Referens 2"?

    Q3: Instead of pre-listing the input sets Referens 1, 2, 3, 4 - can I make a button after the first (with the name "Referens 1") with the text "add more" and then it automatically a new set of input fields appear, same as before, with the name "Referens 2"? And continue adding more sets to eternity?

    Hope for a fast answer :)

    Posted 14 years ago on Tuesday May 3, 2011 | Permalink
  2. Q1) You can populate drop downs dynamically using PHP. If you want to populate them dynamically with a list of Posts, you can do this by writing the necessary PHP to return those posts as the values in the drop down. So yes it's possible, but it requires a little custom PHP to dynamically populate the drop down.

    Q2) Yes, you can write a PHP function that returns what you want and then when writing the PHP to dynamically populate that drop down you can re-use the same function.

    Q3) No, dynamic field creation isn't currently a supported feature. The fields would need to already exist on the form.

    Posted 14 years ago on Tuesday May 3, 2011 | Permalink