Dynamically populate form field, based on two other fields
<p>Say we have a form field and want to populate it with a images based on two other fields. Say these are called COLOUR and STYLE. So if style is 'A' and colour is black, we want to display the unique image representing these choices. If style is 'B' and colour black, another image.</p>

<p>So what is missing from the following?:</p>

<pre><code>add_filter("pre_render", "populate_dropdown");

function populate_dropdown($form){

    if($form["id"] != 1)
        return $form;

    foreach($form["fields"] as &amp;$field)
        if($field["id"] == 1){
            $field["content"] = "DYNAMIC STUFF HERE";
        }

    return $form;
}
</code></pre>
