I went ahead and just did it this way:
[code:1]
<?
global $_CB_framework, $_CB_database, $ueConfig, $mainframe, $_SERVER;
$query = "SELECT cb_state FROM #__comprofiler WHERE id = ". (int) $_CB_framework->myId();
$_CB_database->setQuery( $query );
$state = htmlspecialchars( cbUnHtmlspecialchars( $_CB_database->loadResult() ) );
$query = "SELECT cb_caprovince FROM #__comprofiler WHERE id = ". (int) $_CB_framework->myId();
$_CB_database->setQuery( $query );
$caprovince = htmlspecialchars( cbUnHtmlspecialchars( $_CB_database->loadResult() ) );
$query = "SELECT cb_city FROM #__comprofiler WHERE id = ". (int) $_CB_framework->myId();
$_CB_database->setQuery( $query );
$city = htmlspecialchars( cbUnHtmlspecialchars( $_CB_database->loadResult() ) );
?>
[/code:1]
Then just added the <?php echo $variable; ?> between the default <option> </option>.
It's kind of crude and although it does do the job, there is a glitch in doing it this way. In order to actually pull the other values you have to change the parent selector, otherwise the only option you will have is the one already selected, once you change the parent selector then it loads the other options. I'm sure I figure something out on that, probably something I can add to the ajax script.
What a pain in the butt this has been, it seems like such a simple thing to just add in dependent drop down selectors but it seems like every time I solve one issue I get another lol. I have to say getting the custom registration form in a jquery drop down panel and the edit profile form just as I need it has been one of the most difficult things I've ever tried to do in community builder or joomla.
Post edited by: sfraise, at: 2010/11/22 05:04