wpalchemy repeating fields dropdown issue

I changed the code to loop through all pages, instead of using wp_dropdown_pages() function. Following is the new code <?php while($mb->have_fields_and_multi(‘col2-project’)): ?> <?php $mb->the_group_open(); ?> <p> <span>Select Project</span> <?php $mb->the_field(‘project-id-2’); ?> <select name=”<?php $mb->the_name(); ?>”> <option value=””>None</option> <?php global $thispost; $myposts = get_pages(‘post_type=portfolio&post_status=publish’); foreach($myposts as $thispost) : ?> <option value=”<?php echo $thispost->ID; ?>” <?php $mb->the_select_state($thispost->ID);?> … Read more