This will seem remedial to some, but with such a broad range of skills looking at this forum, I know there must be others like me who struggle with the basics. Here is perhaps not the elegant solution that Emily was looking for in formit, but using some Javascript, a way to "get there."
The problem is stated above. I used Demo 1 from
http://kotowicz.net/jquery-option-tree/demo/demo.html. I needed two files (attached) to be uploaded to my server. I referenced these two files in my revo template for my site (in the head section). Make sure to change them from .txt to .js files in your favorite text editor before you upload them.
<script type="text/javascript" src="assets/.../js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="assets/.../js/jquery.optionTree.js"></script>
What follows is the working example of the code. I needed a foolproof way for registrants to register for an event by their congregational ID# which is largely unknown to the registrant. The result produced by the optionTree directs the registrant to a personalized form (not sure whether that will be a new page or another solution yet) based upon the database key. Hope this helps and thanks so much to microcipcip for guiding me to this solution!
<label for="findUnitID">Find Your Congregation ID Number</label>
<input type="text" name="findUnitID" />
<script type="text/javascript">
$(function() {
var option_tree = {
"Option 1": {"Suboption":200},
"Option 2": {"Suboption 2": {"Subsub 1":201, "Subsub 2":202},
"Suboption 3": {"Subsub 3":203, "Subsub 4":204, "Subsub 5":205}
}
};
$('input[name=findUnitID]').optionTree(option_tree)
.change(function() { if (this.value != -1) { location.href = this.value; } })
});
</script>
[ed. note: webrev last edited this post 14 years, 6 months ago.]