Note that there are some explanatory texts on larger screens.

plurals
  1. POAutomatic redirect when selecting 3rd dropdown in a form?
    text
    copied!<p>I have 3 typeahead fields:</p> <p>They are as follows:</p> <p>Country: |<strong><em>_</em>__<em>_</em>__<em>_</em>____</strong>|</p> <p>State: |<strong><em>_</em>__<em>_</em>__<em>_</em>____</strong>|</p> <p>City: |<strong><em>_</em>__<em>_</em>__<em>_</em>____</strong>|</p> <p>Here is the code for the second typeahead field (the rest are similar):</p> <pre><code>&lt;input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source="["Alabama","Alaska", &lt;many more US states&gt; ,"Wyoming"]"&gt; </code></pre> <p>Now ... I need both typeahead fields to look like dropdowns which can be achieved by following instructions here.. no problem.</p> <ul> <li><a href="https://github.com/danielfarrell/bootstrap-combobox" rel="nofollow">https://github.com/danielfarrell/bootstrap-combobox</a></li> <li><a href="http://dl.dropbox.com/u/21368/bootstrap-combobox/index.html" rel="nofollow">http://dl.dropbox.com/u/21368/bootstrap-combobox/index.html</a></li> </ul> <p>The question I'm asking pertains to the "Last Option" below: Note: I am building this in Rails, so ruby code would be nice...</p> <p><strong>Placeholder Case:</strong></p> <p>I need each of the drop down lists to have a default placeholder text which is grayed out.</p> <p>eg: </p> <p>Country: |<strong>_<em>USA</em>__<em>_</em>__<em>_</em>_</strong>|</p> <p>State: |<strong>_<em>IOWA</em>__<em>_</em>__<em>_</em></strong>|</p> <p>City: |<strong>_<em>DES MOINES</em>____</strong>|</p> <p><strong>Missing Value Case:</strong></p> <p>If the user types in a City value that does not exist in the autocomplete, I want to show them a dropdown with a link..</p> <p>eg: User types in "yahoo" in City field. This should result in the output "That city does not exist, click here to search for it"</p> <p>Clicking on the above text should redirect me to Google.com</p> <p><strong>Error Case:</strong></p> <p>If nothing is selected in the first field (country).. the second field should have a default value in the dropdown: "Please select a Country to begin"</p> <p><strong>Last Option:</strong></p> <p>upon successful selection of a City, eg: San Francisco ... I want to make a redirect to a new html file like "mysite.com/datastore/calsan.html" (first three letters from each selection in lowercase appended together)</p> <p>this final html file will be pre-generated and will have relevant statistics and fun facts about the city "San Francisco"... I'll also have fun facts for other cities pregenerated in the datastore folder.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload